System Preparation

System Preparation

The instructions here should be all you need for installing GCC, OpenMPI and Linux environment modules. Be sure to install it into a non-standard directory, for example /software. Otherwise you can really mess up your system if system-default and user-installed libraries are mixed. To be safe, make sure that you build and install this software as a non-root user. This will cause the installation to fail if it tries to install into system directories.


More information on building and installing GCC can be found here:

The lowest version of GCC that US3D has currently been tested on is GCC-5.2, so you might want to install it as well as the latest GCC 8.x version. Otherwise just match the GCC version for the US3D package that you plan to install.

To build GCC, first download the .tar.gz file from:

Then run the commands:

tar-xzf gcc-5.2.0.tar.gz && cd gcc-5.2.0
cd ..
mkdir build && cd build
../configure --prefix=/software/compilers/gcc/5.2.0 \
make && make install

Note that you should update the command above according to the version of GCC that you are installing.


To build OpenMPI, first download the latest OpenMPI 3.1 from:

For building OpenMPI, I suggest again installing into a separate directory. I suggest /software as a convenient location. I build with a command like:

tar-xzf gcc-5.2.0.tar.gz && cd gcc-5.2.0
CC=`which gcc`
CXX=`which g++`
FC=`which gfortran`
ARGS=" --enable-shared --enable-mpi-fortran=usempi"
ARGS+=" --enable-mpi-thread-multiple"
ARGS+=" --prefix=/software/openmpi/3.1.0/gcc/5.2.0"
mkdir -p build && cd build
$PARGS ../configure $ARGS
$PARGS make -j8 && make install

Next, you’ll want to make sure that you set up Environment Modules to help manage your environment.