Elmer is a finite element software for multiphysical problems published under open source. Elmer is mainly but not exclusively developed by CSC – IT Center for Science.
Elmer/ICE is Open Source Finite Element Software for Ice Sheet, Glaciers and Ice Flow Modelling.
References
To Compile Elmer follow this wiki.
Build Procedure
1. Retrieve the source and unpack it. Here we clone the whole repository:
$ git clone https://www.github.com/ElmerCSC/elmerfem
2. Create build directory
$ mkdir elmer-build
3. Elmer compilation system is built upon CMake which utilizes out of source builds strongly.
Create pre-cache file, and save it as, f.ex, elmer-opts.cmake for CMake which contains something like this:
SET(CMAKE_INSTALL_PREFIX "$ENV{PWD}/../elmer-install" CACHE PATH "") SET(CMAKE_C_COMPILER "gcc" CACHE STRING "") SET(CMAKE_CXX_COMPILER "g++" CACHE STRING "") SET(CMAKE_Fortran_COMPILER "gfortran" CACHE STRING "")
Here you can choose the installation directory for Elmer as well by modifying variable the CMAKE_INSTALL_PREFIX.
In case, you are using intel compiler set elmer-opts.cmake to be as follows:
SET(CMAKE_INSTALL_PREFIX "../elmer-install" CACHE PATH "") SET(CMAKE_C_COMPILER "icc" CACHE STRING "") SET(CMAKE_CXX_COMPILER "icpc" CACHE STRING "") SET(CMAKE_Fortran_COMPILER "ifort" CACHE STRING "")
4. Load the relevant modules e.g.
$ module list Currently Loaded Modulefiles: 1) cmake/3.13.4 2) intel/2018.5.274 3) hpcx/2.4.0 4) mkl/2018.5.274
5. Generate build scripts
$ cd elmer-build --- For elmer use $ cmake -C ../elmer-opts.cmake ../elmerfem --- For elmer/ice add the bool flag $ cmake -C ../elmer-opts.cmake ../elmerfem -DWITH_ElmerIce:BOOL=TRUE ... -- ------------------------------------------------ -- Package filename: elmerfem-8.4-9d3f59b-20190807_Linux-x86_64 -- Patch version: 8.4-9d3f59b -- Configuring done -- Generating done -- Build files have been written to: ..... /elmer-build
The cmake tool will now inform if any libraries are missing. The build configuration can be further edited using e.g. ccmake tool or cmake-gui application.
6. Build and install
$ make -j8 install
Testing Elmer
Quick tests
Go to the build directory and run ctest -L quick or ctest -L fast for some basic tests.
0 Comments