Check
and, if necessary, modify the makefile for the Fortran 90/MPI compiler
used on your system. This means providing correct settings for:
F90= FFLAGS=F90FLAGS=E.g. For the ifort/OpenMPI combination suggested under
Step 1 this should be:
F90=mpif90FFLAGS= -cF90FLAGS= -FR -implicitnone -O3 -Wl, -rpath -Wl,${LD_LIBRARY_PATH}For some simulations it may be necessary to switch from
-O3 to
-O2, although we do not recommend this. For debugging purposes the flags
-DB and
-traceback can be added.
Now
configure the code to run the default test: 2D advection of the VAC
logo in a slab geometry by typing in the 'src' directory:
setamrvac -d=22 -phi=0 -z=0 -p=rho -u=testrho -g=16,16 -cp=openmpi -s
The command setamrvac has a number of options:
Still in the 'src' directory you should now compile the code by typing:
make clean amrvacThe
clean option deletes the '.f', '.o' and '.mod' files from the previous setup. The
amrvac
option tells the 'makefile' to compile the code in its current settings
and create the executable file 'amrvac' in the 'mpiamrvac' directory.
Step 8
Now go to the 'mpiamrvac' directory (
cd ..).
Here you have to create a symbolic link called 'amrvac.par' to
the par-file that is associated with your particular problem. This is
necessary because mpi-amrvac will automatically read its input
parameters from 'amrvac.par'.
The command to create this link is (for the 2D testrho simulation that we have just compiled in steps
6 and
7):
ln -s par/testrho/testrho_vac22 amrvac.par
Step 9
Now the code can be run with the command:
mpirun -np 1 amrvacThe option
-np
followed by a space and then an integer specifies the number of
processors on which the code will be run (In this example only one, and it is in principle also possible to then run directly using the executable
amrvac. Further note that depending on your MPI implementation, the
mpirun command may need to be replaced by
mpiexec). You should now check your result against the description of this example (and start with the data analysis and conversion).