You’ll also want to install Linux Environment Modules
git clone https://github.com/cea-hpc/ modules.git cd modules.git ./configure --prefix=/software/modules make && make install
You’ll want to create GCC and OpenMPI modules. Mine look something like:
hjohnson@kvm-centos-7> module display compilers/gcc/5.2.0 ------------------------------------------------------------------- /software/modules/compilers/gcc/5.2.0: module-whatis Sets the environment for running GCC-5.2.0 prepend-path PATH /software/gcc/5.2.0/bin prepend-path LD_LIBRARY_PATH /software/gcc/5.2.0/lib64 conflict compilers/gcc ------------------------------------------------------------------- hjohnson@kvm-centos-7> cat /software/modules/compilers/gcc/5.2.0 #%Module 1.0 module-whatis "Sets the environment for running GCC-5.2.0" set ghome /software/gcc/5.2.0 prepend-path PATH $ghome/bin prepend-path LD_LIBRARY_PATH $ghome/lib64 conflict compilers/gcc hjohnson@kvm-centos-7> module display openmpi/3.1.0/gcc/5.2.0 ------------------------------------------------------------------- /software/modules/openmpi/3.1.0/gcc/5.2.0: module-whatis Sets the environment for using OpenMPI with gnu compilers prereq compilers/gcc/5.2.0 setenv OPENMPI_HOME /software/openmpi/3.1.0/gcc/5.2.0 prepend-path PATH /software/openmpi/3.1.0/gcc/5.2.0/bin prepend-path LD_LIBRARY_PATH /software/openmpi/3.1.0/gcc/5.2.0/lib conflict openmpi ------------------------------------------------------------------- hjohnson@kvm-centos-7> cat /software/modules/openmpi/3.1.0/gcc/5.2.0 #%Module 1.0 module-whatis "Sets the environment for using OpenMPI with gnu compilers" prereq compilers/gcc/5.2.0 set ompi /software/openmpi/3.1.0/gcc/5.2.0 setenv OPENMPI_HOME $ompi prepend-path PATH $ompi/bin prepend-path LD_LIBRARY_PATH $ompi/lib conflict openmpi
Use the Environment Modules to build and keep track of the different GCC and OpenMPI versions that you install.