-
Notifications
You must be signed in to change notification settings - Fork 13
How to install and use the code
-
C compiler
On Linux use GCC, if it is not already installed you are very unlucky, on Ubuntu type "sudo apt install build-essential"
On OSX use Clang, type "xcode-select --install". If you prefer you can also install GCC, see here http://hpc.sourceforge.net/
-
Parallel computing library OPEN-MPI
I suggest that you create a folder called "software" in your home directory
Download the latest source code from https://www-lb.open-mpi.org/software/ompi/v4.0/
Unzip the file, then from inside the unzipped folder do the following
Type "./configure --prefix=$HOME/software/openmpi"
Type "make"
Type "make install"
-
Data handling library HDF5
Download the latest source code from https://www.hdfgroup.org/downloads/hdf5/source-code/
Unzip the file, then from inside the unzipped folder do the following
Type "./configure --enable-parallel --prefix=$HOME/software/hdf5"
Type "make"
Type "make install"
Open in edit mode the file .bashrc in your $HOME directory
Add the following lines
export PATH = /usr/local/bin/:$PATH
export PATH = $PATH:$HOME/software/openmpi/bin/
export PATH = $PATH:$HOME/software/hdf5/bin/
export LD_LIBRARY_PATH=/usr/local/lib/:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/software/openmpi/lib/
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/software/hdf5/lib/
export DYLD_LIBRARY_PATH=/usr/local/lib/:$DYLD_LIBRARY_PATH
export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$HOME/software/openmpi/lib/
export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$HOME/software/hdf5/lib/
export C_INCLUDE_PATH=$C_INCLUDE_PATH:$HOME/software/openmpi/include/
Gnuplot http://www.gnuplot.info/
Visit https://wci.llnl.gov/codes/visit/
Paraview www.paraview.org
Python https://www.python.org
make -f Makefile.ch4
To launch the code on two processes type mpirun -np 2 ./ch4
The code creates two type of files the ASCII *.dat files and the binary files which are in the folder RUN.
The *.dat file can be visualized with Gnuplot
The files in RUN are of two types the *.h5 files containing the data and the accompanying metadata files *.xmf . The latter files can be opened either with Visit or with Paraview