Difference between revisions of "Building on CentOS6"

From GridPACK
Jump to: navigation, search
(Created page with "This build was done on a VirtualBox instance with a clean install of [https://www.centos.org/ CentOS 6.9]. The compiler and library packages on [https://www.centos.org/ CentO...")
(No difference)

Revision as of 15:56, 3 April 2018

This build was done on a VirtualBox instance with a clean install of CentOS 6.9. The compiler and library packages on CentOS 6.9 are quite old, so it is necessary to build GridPACK prerequisites from source. This build was done with the stock compiler (GNU 4.4), but, it at least one other case, GridPACK was built using Devtoolset-4 (GNU 5.3).

In this description,

Requisite System Software

Some

sudo yum install openmpi-1.10 openmpi-1.10-devel gcc-c++ cmake bzip2-devel git


OpenMPI is installed as a "module". In order to use the compiler wrappers the OpenMPI "module" needs to be "loaded":

module load openmpi-1.10-x86_64

Boost, version 1.54.0

Moderns of Boost will probably not work here (especially Serialization and MPI). So, an old version is needed.

prefix="$HOME/gridpack"
module load openmpi-1.10-x86_64
rm -f ~/user-config.jam
rm -f ./tools/build/v2/user-config.jam
echo "using mpi : mpicxx ;" >> ./tools/build/v2/user-config.jam
sh ./bootstrap.sh \
    --prefix="$prefix" \
    --without-icu \
    --with-toolset=gcc \
    --without-libraries=python,log
./b2 -a -d+2 link=static stage
./b2 -a -d+2 link=static install

GA, version 5.6.5

prefix="$HOME/gridpack"
module load openmpi-1.10-x86_64
sh autogen.sh
./configure \
    --enable-cxx \
    --disable-f77 \
    --enable-i4 \
    --with-mpi \
    --with-mpi-ts \
    --enable-autodetect=yes \
    --prefix=$prefix \
    --without-blas \
    --without-lapack \
    --without-scalapack \
    --enable-shared=no \
    --enable-static=yes \
    MPICC=mpicc MPICXX=mpicxx MPIF77=mpif90 \
    MPIEXEC=mpiexec MPIRUN=mpirun NPROCS=4
make
make -k check
make install

PETSc, version 3.6.4

For some reason, more recent PETSc versions were not recognized by the GridPACK CMake configuration, possibly because of the old compiler. This version appears to work.

prefix="$HOME/gridpack"
module load openmpi-1.10-x86_64
PETSC_DIR="$prefix/petsc-3.6.4"
export PETSC_DIR
python ./config/configure.py \
python ./config/configure.py \
    PETSC_ARCH=linux-gnu44-real-opt \
    --with-prefix="$prefix/" \
    --with-mpi=1 \
    --with-cc="mpicc" \
    --with-fc="mpif90" \
    --with-cxx="mpicxx" \
    --with-c++-support=1 \
    --with-c-support=0 \
    --with-fortran=1 \
    --with-scalar-type=real \
    --with-precision=double \
    --with-clanguage=c++ \
    --with-fortran-kernels=generic \
    --with-valgrind=0 \
    --download-superlu_dist \
    --download-parmetis \
    --download-metis \
    --download-f2cblaslapack=1 \
    --download-mumps=0 \
    --download-scalapack=0 \
    --with-shared-libraries=0 \
    --with-x=0 \
    --with-mpirun=mpiexec \
    --with-mpiexec=mpiexec \
    --with-debugging=0
make PETSC_DIR=/files0/perksoft/petsc-3.6.4 PETSC_ARCH=linux-gnu48-real-opt all
make PETSC_DIR=/files0/perksoft/petsc-3.6.4 PETSC_ARCH=linux-gnu48-real-opt test

GridPACK

prefix="$HOME/gridpack"
module load openmpi-1.10-x86_64
cmake -Wdev --debug-trycompile \
      -D GA_DIR:PATH="${prefix}" \
      -D BOOST_ROOT:PATH="${prefix}" \
      -D USE_PROGRESS_RANKS:BOOL=OFF \
      -D PETSC_DIR:PATH="${prefix}/petsc-3.6.4" \
      -D PETSC_ARCH:STRING="linux-gnu44-real-opt" \
      -D MPI_CXX_COMPILER:STRING="mpicxx" \
      -D MPI_C_COMPILER:STRING="mpicc" \
      -D MPIEXEC:STRING="mpiexec" \
      -D USE_GLPK:BOOL=OFF \
      -D MPIEXEC_MAX_NUMPROCS:STRING="4" \
      -D GRIDPACK_TEST_TIMEOUT:STRING=10 \
      -D BUILD_SHARED_LIBS:BOOL=OFF \
      -D CMAKE_BUILD_TYPE:STRING=Debug \
      -D CMAKE_VERBOSE_MAKEFILE:BOOL=TRUE \
      -D CMAKE_INSTALL_PREFIX:PATH="${prefix}" \
      ..