...
Get the basename (last part of your directory path) of your abs-directory for later use:
Volet |
---|
base_dir=$( basename $PWD ) |
'base_dir' should now be set to 'My_Abs'. You can verify it with:
...
So the object files, libraries and executables will not be under your home, create links for the directories 'build' and 'work'. Pick a place under which you want to keep the object files, libraries and executables under your data space, or example:
Volet |
---|
...
work_space=/.../${USER}/GEM_WORK_DIR |
Create the directories and the links (using ${base_dir} from above) :
Volet |
---|
...
mkdir -p ${work_space}/${base_dir}/build |
...
mkdir -p ${work_space}/${base_dir}/work |
...
ln -s ${work_space}/${base_dir}/build |
...
ln -s ${work_space}/${base_dir}/work |
e) Acquire a compiler
Only needed once per window/terminal. Same as for GEM 5.1.1.
Volet |
---|
module add intel/2021.2.0 fftw-intel-2021 |
f) Set the variable 'abs_dir'
Set the variable 'abs_dir' to the name of your executable directory, including the 'gem' directory (needed under e))
Volet |
---|
abs_dir=$PWD |
g) Change into 'build' directory:
...
Volet |
---|
cd build |
h) Create make files and dependencies
Only need once at the beginning and whenever you add any new routines or add include files or module "use" lines to an existing routine.
cmake -DCOMPILER=intel -DCMAKE_VERBOSE_MAKEFILE=ON -DWORK_PREFIX=${abs_dir}/work ${abs_dir}/project
i) Compile and create executable
make -j4 mainspsdm
Volet |
---|
make mainspsdm |
You can also use n cores in parallel by adding the The key '-jn' makes the command use n cores in parallel. But you can also compile on one core only with: , for example to use 4 cores:
make -j4 make mainspsdm
Config files
You need the following config files:
...