-
Notifications
You must be signed in to change notification settings - Fork 30
Installing LUMA
As LUMA is written in C++, you need to make sure you have a C++ compiler and implementation installed. The compiler must be capable of supporting the C++11 standard.
For Windows users, we recommend you install Visual Studio and also CMake to help build LUMA's dependencies. CMake must be run with administrator privileges. At the time of writing, LUMA has been built and tested using Visual Studio 2015. Dependencies have been configured for VS2015 using CMake v3.9.1. Visual Studio and CMake can be obtained from their respective webiste.
LUMA and its dependencies require the GNU C/C++ compiler to be installed. LUMA has been built successfully using GCC 4.9.0 on Ubuntu 14.04. Makefiles are supplied with LUMA to allow the use of the GNU Make utility for build management.
Before building LUMA you first need to build the dependencies following this guide.
Once you have the dependencies built, you will need to make a note of the location of the relevant header files and library files. These paths will be required to allow LUMA to include relevant headers and link to the dependencies you have just built.
As with the dependencies, we recommend on Windows that you use Visual Studio 2015 to build and run LUMA. Add the files in the inc and src directories to a new C++ project in Visual Studio.
Under Project->Properties, add the following to the Additional Include Directories value on the C/C++->General tab:
$(HDF5_INC);
$(MSMPI_INC);
where $(HDF5_INC) and $(MSMPI_INC) are the paths to your HDF5 and MPI header files respectively.
Under Linker->General add the following to the Additional Library Directories value:
$(MSMPI_LIB);
$(HDF5_LIB);
$(LAPACK_LIB);
where these are the paths to the built binaries for MPI, HDF5 and LAPACK.
Finally, add the following to the Additional Dependencies value on the Linker->Input tab:
szip.lib;
zlib.lib;
libhdf5.lib;
msmpi.lib;
liblapack.lib;
to allow linking against HDF5, MPI and LAPACK libraries.
Note: Debug builds for some dependencies append a _D to the end of the library name. You may need to set up Release and Debug build configurations separately in Visual Studio using the appropriately named library.
The following steps will guide you through how to compile and run LUMA using the GCC compiler assuming you have already built the dependencies using this guide. While it isn't essential to set the HDF5_HOME environment variable, it makes running LUMA more convenient:
First find the path to where the HDF5 library is installed - for us this is at /usr/lib/x86_64-linux-gnu/hdf5/mpich and set the HDF5_HOME environment variable:
export HDF5_HOME=/usr/lib/x86_64-linux-gnu/hdf5/mpich
(this can be added to your bash .profile to save you having to do this every time you open a terminal).
When compiling use the MPICH wrapper script (with the C++11 option) and make sure the HDF5 libraries are included and linked:
mpicxx -std=c++0x -O3 -I{HDF5_HOME} /include path_to_LUMA/src/* -o LUMA -L{HDF5_HOME}/lib -lhdf5
(the optimisation flag is optional)
If everything has gone as planned there will be an executable in your working directory called LUMA. To run LUMA enter the command:
mpirun -np NPROCS ./LUMA
where NPROCS is the number of processes you want to run LUMA with (this value must match the number of processes set in the definition file before compiling LUMA). If building in serial, LUMA still needs to link to the HDF5 libraries to compile but LUMA can be run without the need for an MPI environment as ./LUMA.
The h5mgm merge tool is a post-processor that takes the multi-grid HDF output from LUMA and converts this data into a time-series of VTU mesh files readable into Paraview. A guide to building the merge tool is available here.
In order to verify LUMA is installed correctly, download and run one of the test cases.
Lattice-Boltzmann @ The University of Manchester (LUMA) -- School of Mech., Aero. & Civil Engineering