Building on Ubuntu 18
This page is under construction.
Building GridPACK on Ubuntu 18.04 is slightly more complicated than building it on Ubuntu 16.04. The main differences are that 1) the PPN build does not work for this version of Ubuntu and 2) the Global Arrays library must be built by hand. MPI, Boost and PETSc can all be installed using the package manager. This example was performed on a Virtual Box instance running a clean install of Ubuntu Linux 18.04 (LTS). Virtual Box is not required and this build should work on Linux systems using the Ubuntu operating system. You will need super user or sudo privileges for this installation.
A few basic development packages will be necessary. Install them with
sudo apt-get install git build-essential devscripts equivs
Install Required Packages
Before installing the remaining packages, you must first download GridPACK onto your computer and put it in a convenient directory. Information on how to download and install GridPACK can be found here.
All the GridPACK prerequisites packages can be installed using the packaging information in the source. Run this command in the top directory of the cloned repository:
sudo mk-build-deps -i
This will make and install a virtual package called
gridpack-build-deps with most of the dependencies needed to build GridPACK.
Build and Install Global Arrays
Get the Global Arrays source from the release page. We recommend using version 5.6 or 5.7 but any recent version should work. Unpack GA in a convenient location. In the unpacked directory, configure, build, and install using
./configure --enable-i4 --without-blas --enable-cxx --with-mpi-ts --disable-f77 \ --prefix="/home/gridpack/software/ga-5.7" make make install
Be sure and replace the install directory in red with an appropriate directory on your local system.
Build and Test GridPACK
Obtain the GridPACK release or development code and put it in a convenient directory.
From the top-most GridPACK source directory, do the following:
mkdir src/build cd src/build
Modify this configuration recipe to fit your needs. The main changes you need to make are to modify the directories to reflect your local file structure.
rm -rf CMake* export CC=gcc export CXX=g++ cmake \ -D PETSC_DIR:STRING="/usr/lib/petsc" \ -D PARMETIS_DIR:PATH="/usr" \ -D GA_DIR:STRING="/home/gridpack/software/ga-5.7" \ -D MPI_CXX_COMPILER:STRING="mpicxx" \ -D MPI_C_COMPILER:STRING="mpicc" \ -D MPIEXEC:STRING="mpiexec" \ -D MPIEXEC_MAX_NUMPROCS:STRING="2" \ -D GRIDPACK_TEST_TIMEOUT:STRING="20" \ -D USE_GLPK:BOOL=ON \ -D GLPK_ROOT_DIR:PATH="/usr" \ -D BUILD_SHARED_LIBS:BOOL=OFF \ -D CMAKE_INSTALL_PREFIX:PATH="/home/gridpack/gridpack-3.3/src/build/install" \ CC=gcc CXX=g++ .. make make install
Again, be sure and modify the Global Array directory and the GridPACK installation directories in red to match the appropriate locations on your local system.
Removing Required Software
If no longer needed, the required packages can be removed using
sudo apt-get purge gridpack-build-deps sudo apt autoremove