afivo-streamer
1.1
1D/2D/3D streamer simulations with AMR
|
gfortran 11
, which supports Fortran 2008git
to download and update the source codeRun the following command in a folder to clone the repository:
git clone https://github.com/MD-CWI/afivo-streamer.git
Then you can go into the folder and compile the code:
cd afivo-streamer make
Afterwards, you can run some of the example, see Examples.
If you want to update your previously downloaded code, go into your afivo-streamer folder and pull the new version:
git pull
Afterwards, you can recompile the code by typing
make
either in the afivo-streamer
folder, or in a specific program folder with a Makefile
.
A number of flags can be set to help with debugging or performance testing. To apply these, first remove all previously compiled files:
make allclean
This is also useful when upgrading e.g. the compiler on your system. Afterwards, a number of flags can be applied, most importantly:
make DEBUG=1
leads to a much slower executable that does all kinds of error checking (array bounds, division by zero etc.)make PROF=gprof
compile with -pg
support for gprof
make PROF=gperftools
link with libprofiler
to enable gperftools
, see https://teunissen.net/afivo/md_documentation_profiling.htmlmake COMPILER=ifort
to use the ifort
compilerAfterwards, perform make allclean
again to revert to the standard compilation settings.
make
to compile the code in Fedora systems (30 and above) gives an error. A closer inspection indicates that the g77
compiler is missing. This is because the makefile is unable to find the gcc
, gfortran
and g++
compilers. This can be overcome by typing the following in the terminal:export CC=/usr/bin/gcc
export CXX=/usr/bin/g++
export FORT=/usr/bin/gfortran
/usr/bin
is the default installation location for the GNU compilers. If you have them installed in a different directory (in case you have multiple versions of compilers), then make sure you use that particular location (instead of /usr/bin
).build_silo.sh
can be executed manually from the ‘afivo/external_libraries’ folder for easier debugging./usr/bin/ld: cannot find -lsz
. Solution (on Fedora) sudo dnf install libaec-devel
build_silo.sh
just before the #Configure
comment: export CC=/usr/bin/gcc
export CXX=/usr/bin/g++
export FC=/usr/bin/gfortran