Skip to content

Building Dependencies

Adrian Harwood edited this page Oct 12, 2017 · 16 revisions

LUMA uses the following third party libraries. In order to successfully build and run LUMA you will need to install / build the following. If using Visual Studio on Windows you will need to ensure you build each dependency using the Release x64 build configuration (assuming you are looking to build LUMA for a 64-bit machine).

MPI

For Windows users, LUMA has been successfully built and tested using MS-MPI v8.0.12438.0. For Linux and Mac users, LUMA has been tested with MPICH v3.2 and OpenMPI v1.6.

Windows

MS-MPI and the associated MS-MPI SDK (for the headers) may be installed using the installer available from the MSDN website.

Mac and Linux

MPICH on Mac and Linux can be installed through your package manager. On Ubuntu 14.04 we recommend Apt and to install MPICH 3.2 using the following command:

sudo apt-get install mpich

HDF

LUMA has been successfully built and tested using HDF5 1.8.17. The appropriate source code can be downloaded from the HDF Group website. Later releases of the installer build the SZip and ZLib dependencies along with the rest of the HDF5 libraries. However, if you do need to build these two dependencies separately you can download their sources files from the appropriate links on the HDF website.

Note: LUMA uses parallel HDF5 I/O which relies on MPI I/O. You must build MPI first to allow HDF5 to build correctly.

Windows

To build from source on Windows using Visual Studio, we recommend that you use CMake to generate a VS solution from the source code. If you need to build SZip and ZLib separately then build these first and add the paths of the built libraries to the appropriate fields during the CMake configure step. If you have the version of the HDF5 source that includes these dependencies then you can skip this and just configure and build the HDF source.

Note: You must enable the HDF5_ENABLE_PARALLEL flag in the CMake configuration to build the parallel version of HDF5 otherwise LUMA will not build when compiling a parallel case.

Mac and Linux

You can install parallel HDF5, pre-built binaries using your package manager. For Apt on Ubuntu 14.04 use:

sudo apt-get install libhdf5-mpich-dev

VTK (Merge Tool Only)

The merge tool requires VTK to be built and executed. The source code can be obtained from the VTK website.

Windows

As before, build VTK using CMake and Visual Studio. You will need to update your system PATH variable with the path to the VTK *.dlls to avoid "*.dll is missing" errors when running the merge tool.

Mac and Linux

TODO: Add instructions here

LAPACK

The FEM solver utilises numerical recipes implemented in LAPACK. LUMA has been tested successfully using LAPACK v3.6.0.

Windows

LAPACK methods are implemented in Fortran and hence must be built using a Fortran compiler. To build LAPACK without relying on a commercial compiler we recommend using MinGW which is a free Windows port of some of the GNU tools. This provides the GNU Fortran compiler for compiling LAPACK. Follow the steps below to build LAPACK using MinGW and CMake.

  1. Install MinGW-w64 -- we have tested with v5.0.2 (GCC 7.0.1).
  2. Download LAPACK source.
  3. Add environment variable pointing to MinGW-w64 binary folder and add to PATH variable in Windows -- this allows LUMA to link to runtime MinGW DLLs.
  4. In CMake, select generator as MinGW Makefiles rather than VS 2015 and select specify native compilers radio button.
  5. Select native compilers from the MinGW binary directory for C, C++ and Fortran (e.g. gcc, g++ and gfortran) and configure.
  6. Check BUILD_SHARED_LIBS and CMAKE_GNUtoMS and reconfigure.
  7. Generate build files with CMake.
  8. Open a PowerShell/CMD window in the build directory and run mingw32-make.exe (equivalent of running make in Linux environment) to build LAPACK.

Mac and Linux

TODO: Add instructions here

Build LUMA

Once you have built the dependencies, you can continue building LUMA.

Clone this wiki locally