Building on Ubuntu

From GridPACK
Revision as of 19:56, 20 November 2013 by Perk (talk | contribs)

Jump to: navigation, search

This build was performed on a Virtual Box instance running a clean install of Ubuntu Linux 13.10. Exactly the same process was also followed for a clean install of Linux Mint 15 on a Virtual Box.

Most of the prerequisite software was installed using Ubuntu packages. Boost was installed like this

 sudo apt-get install libboost-all-dev

This installed a C++ compiler and OpenMPI compiler wrappers, as well as all of Boost. Other available packages were installed using

 sudo apt-get install openmpi-bin make cmake subversion gfortran lapack-dev doxygen

The doxygen package can be skipped, since it installs a large number of dependencies.

Building PETSc

PETSc version 3.4.3 was configured and built as follows:

 prefix="$HOME/stuff"
 PETSC_DIR="$prefix/petsc-3.4.3"
 export PETSC_DIR
 python ./config/configure.py \
     PETSC_ARCH=arch-linux2-complex-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=0 \
     --with-pthread=0 \
     --with-scalar-type=complex \
     --with-fortran-kernels=generic \
     --download-superlu_dist \
     --download-parmetis \
     --download-metis \
     --with-clanguage=c++ \
     --with-shared-libraries=0 \
     --with-dynamic-loading=0 \
     --with-x=0 \
     --with-mpirun=mpirun \
     --with-mpiexec=mpiexec \
     --with-debugging=0
 make PETSC_DIR="$prefix/petsc-3.4.3" PETSC_ARCH=arch-linux2-complex-opt all
 make PETSC_DIR="$prefix/petsc-3.4.3" PETSC_ARCH=arch-linux2-complex-opt test

ParMETIS was included in the build, so separate compilation was not necessary.

Global Arrays

Global Arrays version 5.2 was configured, built, and installed as follows:

 prefix="$HOME/stuff"
 ./configure \
     --enable-cxx \
     --enable-i4 \
     --disable-f77 \
     --with-mpi \
     --prefix="$prefix" \
     --with-blas=no \
     --with-lapack=no \
     --enable-shared=no \
     --enable-static=yes \
     MPICC=mpicc MPICXX=mpicxx MPIF77=mpif90 \
     MPIEXEC=mpiexec MPIRUN=mpirun
 make
 make install


Building and Testing GridPACK

GridPACK was configured and built as follows:

 rm -f CMakeCache.txt
 prefix="$HOME/stuff"
 cmake -Wno-dev --debug-try-compile \
     -D PETSC_DIR:STRING="$prefix/petsc-3.4.3" \
     -D PETSC_ARCH:STRING="arch-linux2-complex-opt" \
     -D GA_DIR:STRING="$prefix" \
     -D MPI_CXX_COMPILER:STRING="mpicxx" \
     -D MPI_C_COMPILER:STRING="mpicc" \
     -D MPIEXEC:STRING="mpiexec" \
     -D CMAKE_BUILD_TYPE:STRING="Debug" \
     -D CMAKE_VERBOSE_MAKEFILE:BOOL=TRUE \
     ..
 make 
 make test