Building on Ubuntu

From GridPACK
Revision as of 21:09, 30 September 2016 by Wperkins (talk | contribs) (PETSc)

Jump to: navigation, search

This build was performed on a Virtual Box instance running a clean install of Ubuntu Linux 16.04 (LTS). Most of the prerequisite software was installed using Ubuntu packages. Any packages that needed to be built from source were installed in /usr/local/gridpack

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 git gfortran liblapack-dev doxygen

The doxygen package can be skipped, since it installs a large number of dependencies. A compatible ParMETIS package is available, so install that

 sudo apt-get install libmetis-dev libparmetis-dev


PETSc

Ubuntu packages for PETSc 3.6 were available. These can be installed with

 sudo apt-get petsc3.6-dev petsc-complex-3.6-dev

These are built with several optional packages, including Hypre, SuiteSparse, and MUMPS. SuperLU is also include, not SuperLU_DIST, which will limit direct linear solver methods in parallel. Alternatively, PETSc can be built from source.

Global Arrays

Global Arrays from SVN was configured, built, and installed as follows:

 svn co https://svn.pnl.gov/svn/hpctools/trunk/ga ga-trunk
 cd ga-trunk
 prefix="/usr/local/gridpack"
 ./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
 sudo 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