-
Notifications
You must be signed in to change notification settings - Fork 6
Home
Welcome to the UP2D wiki!
You first have to choose a compiler. Usually, you will want to use either gfortran
or ifort
, if the latter is available. You set the compiler in the environment (BASH):
export FC=gfortran
FFTW is the FFT engine used in UP2D. Download the tarball from http://www.fftw.org/ and extract it somewhere. We usally use ~/src/ for the libraries
cd YOUR_FFTW_DIRECTORY
./configure --prefix=$PWD --enable-sse2 --enable-openmp --enable-threads
make -j4
make install
Please note that on some machines, the resulting library will be in YOUR_FFTW_DIRECTORY/lib64/
and not in YOUR_FFTW_DIRECTORY/lib
and we'll have trouble with that. Please create a softlink then ln -s lib64 lib
.
We finally need to tell UP2D where to find FFTW, and we do this through the environment variable $FFT_ROOT
export FFT_ROOT=$PWD
that's it already!
HDF5 is the library we use for input and ouptut of flow field data. You have two options to install it: the first one is the easy installation with your linux distribution. For example on an Ubuntu system, you can sudo apt-get install hdf5..... hdf5....devel
where you need to look for the correct name of the packet to be installed. Usually, you then do not have to set neither HDF_ROOT
nor LD_LIBRARY_PATH
in your shell.
If you do not have HDF5 in this system, or you have no root access (on clusters, e.g.), and you do not want to bother the admins, simply install it yourself locally. It is not very hard. Download it hdf5-1.8.14.tar.gz from somewhere and extract it. Please note: if you install FLUSI https://github.com/pseudospectators/FLUSI as well, it is wise to keep the HDF5 for UP2D and FLUSI separate by using different folders
cd YOUR_HDF5_DIRECTORY
./configure --prefix=$PWD --enable-fortran
make -j1
make install
Please note that on some machines, the resulting library will be in YOUR_HDF5_DIRECTORY/lib64/
and not in YOUR_HDF5_DIRECTORY/lib
and we'll have trouble with that. Please create a softlink then ln -s lib64 lib
.
Tell our code where to find the HDF5 installation:
export HDF_ROOT=$PWD
Note: it can happen that the code yells later, when compiled sucessfully, that shared libraries cannot be found. In this case, append the HDF5 directory to $LD_LIBRARY_PATH
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HDF_ROOT/lib
if you did the above two steps and set the environment variables, you can download up2d and compile it using make