Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
# Installation Procedure for SPCPC (OpenSUSE)
## 1. Prelude
1.1 Clone the repository:
```bash
git clone https://gitlab.epfl.ch/ahoffman/gyacomo.git
```
1.2 Purge and Load Required Modules
```bash
module purge
module load intel_comp/19.1 impi/5.0.3 mumps/4.10.0 hdf5/1.8.9
```
1.3 Enter the `gyacomo` directory:
```bash
cd gyacomo
```
1.4 Make a `lib` directory, e.g., in `/gyacomo`:
```bash
mkdir lib
```
**Important:** Adjust the `gyacomo/local/dirs.inc` file by setting the paths to your `gyacomo` folder in the `PREFIX` variable and your path to the `lib` folder in the `LIBDIR` variable.
#### Test Installation and Linkage
Test the installation and linkage by typing `make` in `/gyacomo`. The compilation should halt with an error at the call of `futils` routines in `src/parallel_mod.F90`.
## Install Libraries
We now install the required external librairies.
### 2. Futils
2.1 Clone the `futils` library (or request access if needed):
```bash
git clone https://c4science.ch/diffusion/FUTILS/futils.git
```
2.2 Navigate to the `src` directory:
```bash
cd /futils/src
```
2.3 Adapt the makefile:
```bash
sed -i '37s/.*/OPT = -O3/' Makefile
```
2.4 Then compile:
```bash
make lib
```
2.5 Create necessary directories:
```bash
mkdir -p include/O
mkdir -p include/g
mkdir -p lib/O
mkdir -p lib/g
```
2.6 Install:
```bash
make install
```
#### Test Installation and Linkage
Test the installation and linkage by typing `make` in `/gyacomo`. The compilation should halt with an error at the call of `fftw` routines in `src.fourier_mod.F90`.
### 3. FFTW
3.1 Download `fftw` zip directory, unzip, and navigate to the directory:
```bash
wget http://www.fftw.org/fftw-3.3.10.tar.gz
tar -xvf fftw-3.3.10.tar.gz
cd fftw-3.3.10
```
3.2 Configure and make the double-precision version:
```bash
./configure --enable-mpi --prefix=$PWD
make
```
3.3 Install it:
```bash
make install
```
3.4 Repeat for the single-precision version:
```bash
./configure --enable-float --enable-mpi --prefix=$PWD
make
make install
```
3.5 Gather lib files in a new `lib` subdirectory:
```bash
mkdir lib
cp lib64/* lib/.
cp *.la lib/.
```
#### Navigate Back to Gyacomo
Go back to `/gyacomo` and verify that `FFTW3DIR = $(LIBDIR)/fftw-3.3.10` in `/gyacomo/local/dirs.inc` when `ENVTYPE = Linux`.
#### Test Installation and Linkage
Test the installation and linkage by typing `make` in `/gyacomo`. The compilation should halt with an error at the call of `FM` routines in the `src/coeff_mod.F90` file.
## 4. FM
4.1 Navigate back to the main `lib` directory (e.g., `/gyacomo/lib/`) and download the zipped folder:
```bash
wget https://dmsmith.lmu.build/FM1.4/FM_files.zip
```
4.2 Unzip and enter the folder:
```bash
unzip FM_files.zip
mv FM_files FM
cd FM
```
4.3 Copy the source file with a `.F90` extension (for older Intel compilers):
```bash
for file in *.f95 ; do cp "$file" "${file%.*}.F90" ; done
```
4.4 Compile manually (~5min):
```bash
ifort fmsave.f95 -c -O3
ifort fm.f95 -c -O3
ifort fmzm90.f95 -c -O3
ifort TestFM.f95 -c -O3
ifort SampleFM.f95 -c -O3
ifort fmsave.o fm.o fmzm90.o TestFM.o -o TestFM
ifort fmsave.o fm.o fmzm90.o SampleFM.o -o SampleFM
```
4.5 Test the installation:
```bash
./TestFM
./SampleFM
```
4.6 Put the library together and move it to a local `lib` directory:
```bash
mkdir lib
ar r libfm.a fm.o fmsave.o fmzm90.o
mv libfm.a lib
```
4.7 Move the `.mod` files to a `mod` local directory:
```bash
mkdir mod
mv *.mod mod
```
## Test Installation and Linkage
Test the installation and linkage by typing `make` in `/gyacomo`. The compilation should proceed and produce an executable in `/gyacomo/bin/.` named `gyacomo23_dp`.
## 5. First Run
If the executable `gyacomo23_dp` is present in `/gyacomo/bin/.`, you can now test the first run of the code.
In `/gyacomo`, run the simulations setup script:
```bash
sh new_prob.sh ZBC
```
`ZBC`stands for Z-pinch base case, which is a 2D nonlinear simulation (recommended for a light run). You can also call the script with `CBC`, which is a minimal example of a cyclone base case (underresolved to be light).
This creates a new folder, `/gyacomo/simulations/`, with an example of a simulation directory `/gyacomo/simulations/problem_01`. Inside, you can find a `tutorial.md` file explaining how to run the code and analyze its data.