Installation instructions for 3rd party software can be found at the bottom of the page.
A fortran, c++ compiler and cmake version 2.8.7 or higher.
Python, Doxygen, GraphViz (Dot), MPI, METIS and PETSc
Doxygen is required to build a local copy of the documentation and GraphViz to create the uml diagrams for the documentation. MPI and METIS are required for parallel builds of hpGEM. PETSc is set of scientific routines for scientific computing. It is required by some hpGEM applications. Python is used by the test suite for comparing output files. It is not required to run hpGEM normally, but some tests will fail if you do not have it installed.
Checking what packages you have
You only have to check for cmake, as cmake will check for the other packages for you. See installation instructions below.
You can download hpGEM using this link
1) Version 2 of hpGEM is installed using cmake version 2.8.7 or higher. So first check if you have cmake installed and what version by typing
If reports an error (i.e. you do not have cmake), or your version is older 2.8.7, please install cmake; otherwise, proceed to step 2.
Download cmake from the following website.
You have a choice of obtaining binaries (easy option) or building from source. Below is addition information on building from source.a) If you have old version of cmake installed unpack and untar the downloaded file. Then change to this directory and type
cmake . makeb) If you do have any version of cmake installed.
./bootstrapii) For windows download the installer from the downloads page.
Very important note, if you are updating scroll down to the bottom of the page and follow the update installation instructions. Do not reinstall you can use an older version of cmake to install the latest version.
2) Installing hpGEM using cmake
cmake is designed for out of source building and we do higher recommend this. So first make a directory for the build, say
mkdir hpGEM_BUILDFor the purpose of the rest of this tutorial we will use
cd $hpGEM_BUILD/ cmake-gui $hpGEM_SRC
You will be presented with cmake configuration window. Confirm the source code directory is correct i.e. the field "where is the source code" and check the build directory i.e. "where to build the binaries" is also correct.
(ii) Click the configure button. From the drop-down menu you can choice whether to create file for a given IDE or 'Unix Makefiles'. We will assume you choose 'Unix Makefiles' and select use "Use default native compilers".
(iii) Click Done. In the at the bottom of the screen it will report the locations of the required compilers and other files. If you see red text you are missing a required compiler, please install the missing component and try again.
(iv) In the top box you will see two items CMAKE and hpGEM. From here you can configure/customise a lot of options. Here we will just highlight two you are likely to use
a) On the hpGEM menu you see "hpGEM_BUILD_DOCUMENTATION", select this if you want a local copy of the documentation to be available. Note this does require doxygen to be installed and GraphViz (Dot) for the UML diagrams are included as well.
b) On the CMAKE menu you will see "CMAKE_BUILD_TYPE".
cd $hpGEM_BUILD ccmake $hpGEM_SRC
(ii) Type c to configure. Error message will be reported to the screen if you are missing packages please install them and try again.
(iii) Use the arrow keys you can navigate around and from you can configure/customise a lot of options. Here we will just highlight two you are likely to use
a) Setting "hpGEM_BUILD_DOCUMENTATION" will enable a local copy of the documentation to be built. Note this does require doxygen to be installed and GraphViz(Dot) if the UML diagrams are to be included as well.
b) Entering the word 'Debug' in the "CMAKE_BUILD_TYPE" box, will cause the code to be built in debug mode.
(iii) After any change type 'c' again to reconfigure.
(iv) Once you have it configured as you want type 'g'. This will generate the require makefiles and quit the program.
(c) make style : cmake
cd $hpGEM_BUILD cmake $hpGEM_SRC
(ii) This will check you have the correct packages installed and if you have create the required makefiles.
(iii) Note you can pass many additional flags to this package to customise the installation. Here we will highlight two you are likely to use
a) Adding the flag '-DhpGEM_BUILD_DOCUMENTATION=on will enable a local copy of the documentation to be build. Note this does require doxygen to be installed and GraphViz(Dot) if the UML diagrams are to be included as well.
b) Adding the flag '-DCMAKE_BUILD_TYPE=Debug' will cause the code to be build in debug mode.
3) Building the project
4) Testing the installation
5) Installing a local code of the documentation (only available if you enabled this option in step 2)
make doc firefox docs/html/index.html
Note: replace firefox with which every web browser you have installed
or on a mac
make doc open docs/html/index.html
This should come with integrated development environments (IDEs).
For all non windows operating systems we recommend gfortran which is available from
These instructions assume you use cmake-gui.