Skip to content

Debian GCC 7.1

Glen Hansen edited this page Feb 11, 2019 · 3 revisions

This set of build instructions builds the master branch of Albany on a Debian machine, using GCC 7.1.0

This is the jenga server at RPI:

	cat /proc/version

	Linux version 2.6.32-5-amd64 (Debian 2.6.32-48squeeze20) ([email protected]) (gcc version 4.3.5 (Debian 4.3.5-4) ) #1 SMP Mon Feb 29 00:33:51 UTC 2016

The compilers are gcc 7.1.0, OpenMPI 2.1.0, and Debian linux.

General info

To determine the version of open mpi that you are using, type:

	/users/ghansen/ompi-gcc/bin/ompi_info

Building GCC 7.1.0

	cd /fasttmp/ghansen
	wget http://www.netgull.com/gcc/releases/gcc-7.1.0/gcc-7.1.0.tar.bz2
	tar -xvf gcc-7.1.0.tar.bz2
	cd gcc-7.1.0
	./contrib/download_prerequisites
	mkdir ../gcc-build
	cd ../gcc-build
	../gcc-7.1.0/configure --prefix=/users/ghansen --disable-multilib --enable-languages=c,c++,fortran
	make -j 8
	< go have a coffee >
	make -j 8 install

Building OpenMPI 2.1.0

	cd /fasttmp/ghansen
	wget https://www.open-mpi.org/software/ompi/v2.1/downloads/openmpi-2.1.0.tar.bz2
	tar -xvf openmpi-2.1.0.tar.bz2
	cd openmpi-2.1.0
	./configure --prefix=/users/ghansen/ompi-gcc CC=/users/ghansen/bin/gcc CXX=/users/ghansen/bin/g++ FC=/users/ghansen/bin/gfortran
	make -j 8
	make -j 8 install

Build supporting packages

Trilinos requires a set of "third party libraries" (TPLs) to support Albany. The actual libraries needed depends on the final Albany configuration desired. These instructions build a superset, all the libraries needed to support any Albany configuration.

Notes: In this example

  • The TPLs are installed in /users/ghansen

Building ZLib

  • Version 1.2.11

      cd /fasttmp/ghansen
      wget http://zlib.net/zlib-1.2.11.tar.gz
      tar -xvf zlib-1.2.11.tar.gz
      cd zlib-1.2.11
      mkdir build
      cd build
      cmake \
      -DCMAKE_C_COMPILER=/users/ghansen/ompi-gcc/bin/mpicc \
      -DCMAKE_C_FLAGS='-O3 --64 --archs="-arch x86_64"' \
      -DCMAKE_INSTALL_PREFIX=/users/ghansen \
      ..
    
      make -j 8
      make install
    

Building HDF5

  • Version 1.8.18

      wget https://support.hdfgroup.org/ftp/HDF5/current18/src/hdf5-1.8.18.tar.bz2
      tar -xvf hdf5-1.8.18.tar.gz
      cd hdf5-1.8.18
      ./configure --prefix=/users/ghansen CC=/users/ghansen/ompi-gcc/bin/mpicc \
      CXX=/users/ghansen/ompi-gcc/bin/mpicxx FC=/users/ghansen/ompi-gcc/bin/mpif90 \
      CXXFLAGS="-fPIC -O3 -march=native" CFLAGS="-fPIC -O3 -march=native" FFLAGS="-fPIC -O3 -march=native" \
      --enable-parallel --enable-shared --with-zlib=/users/ghansen
      make -j 4
      make install
    

Building parallel-netcdf

  • Version 1.8.1

  • Configure and build:

      wget http://cucis.ece.northwestern.edu/projects/PNETCDF/Release/parallel-netcdf-1.8.1.tar.gz
      tar -xvf parallel-netcdf-1.8.1.tar.gz
      cd parallel-netcdf-1.8.1/
      ./configure --prefix=/users/ghansen CC=/users/ghansen/ompi-gcc/bin/mpicc \
      FC=/users/ghansen/ompi-gcc/bin/mpif90 CXX=/users/ghansen/ompi-gcc/bin/mpicxx \
      CXXFLAGS="-O3 -march=native -fPIC" CFLAGS="-O3 -march=native -fPIC" FFLAGS="-O3 -march=native -fPIC" \
      FCLAGS="-O3 -march=native -fPIC"
      make -j 8 
      make install
    

Building Netcdf

  • Version 4.4.1.1

  • Edit the file include/netcdf.h. Make the following edits near line 265:

      #define NC_MAX_DIMS    65536    /* max dimensions per file */
      #define NC_MAX_ATTRS    8192    
      #define NC_MAX_VARS   524288    /* max variables per file */
      #define NC_MAX_NAME   256 
      #define NC_MAX_VAR_DIMS      8     /* max per variable dimensions */
    
  • Now, configure and build:

      LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/users/ghansen/lib:/users/ghansen/lib64 \
      ./configure --prefix=/users/ghansen CC=/users/ghansen/ompi-gcc/bin/mpicc \
      FC=/users/ghansen/ompi-gcc/bin/mpif90 CXX=/users/ghansen/ompi-gcc/bin/mpicxx \
      CXXFLAGS="-I/users/ghansen/include -O3 -march=native -fPIC" \
      CFLAGS="-I/users/ghansen/include -O3 -march=native -fPIC" LDFLAGS="-L/users/ghansen/lib -O3 -march=native -fPIC" \
      --disable-fsync --enable-shared --disable-doxygen --enable-netcdf-4 --enable-pnetcdf
      make -j 4 
      make install
    

Note: Need to have libpnetcdf.so "visible" to the above configure script or the configure command will disable the --enable-pnetcdf option.

Building boost

  • Version 1.64.0

  • Build boost with the commands

      rm ~/user-config.jam
      echo "using gcc : 7.1.0 : /users/ghansen/bin/g++ : <compileflags>"-O3 -march=native" <library-path>/users/ghansen/ompi-gcc/lib <find-shared-library>mpi ;" >> ~/user-config.jam
      echo "using mpi : /users/ghansen/ompi-gcc/bin/mpicxx : <cxxflags>"-O3 -DNDEBUG -march=native" <include>/users/ghansen/ompi-gc/include <library-path>/users/ghansen/ompi-gcc/lib <find-shared-library>mpi ;" >> ~/user-config.jam
      ./bootstrap.sh --with-libraries=signals,regex,filesystem,system,mpi,serialization,thread,program_options,exception --prefix=/users/ghansen
      ./b2 -j 4
      ./b2 -j 4 install
    

Building ParMetis

  • Version 4.0.3

      cd /fasttmp/ghansen
      wget http://glaros.dtc.umn.edu/gkhome/fetch/sw/parmetis/parmetis-4.0.3.tar.gz
      tar -xvf parmetis-4.0.3.tar.gz
      cd parmetis-4.0.3
    
  • Edit metis.h to use an IDXTYPEWIDTH of 64

      cd metis/include
      vi metis.h
      #define IDXTYPEWIDTH 64
    
  • Run CMake to build parmetis

      cd /fasttmp/ghansen/parmetis-4.0.3
      mkdir build2
      cd build2
      export metis=/fasttmp/ghansen/parmetis-4.0.3/metis
      cmake \
      -DCMAKE_INSTALL_PREFIX=/users/ghansen \
      -DMETIS_PATH=$metis \
      -DGKLIB_PATH=$metis/GKlib \
      -DCMAKE_C_COMPILER=mpicc \
      -DCMAKE_CXX_COMPILER=mpicxx \
      ..
      make -j 4
      make install
    
      cp libmetis/libmetis.a /users/ghansen/lib
      cp $metis/include/metis.h /users/ghansen/include
    

SuperLU

  • Version 4.3

      wget http://crd-legacy.lbl.gov/~xiaoye/SuperLU/superlu_4.3.tar.gz
      tar -xvf superlu_4.3.tar.gz
      cd SuperLU_4.3
    
  • Build paths

      mkdir /users/ghansen/SuperLU_4.3
      mkdir /users/ghansen/SuperLU_4.3/include
      mkdir /users/ghansen/SuperLU_4.3/lib
    
  • Edit make.inc for your machine and environment

      PLAT = _linux
      SuperLUroot = /users/ghansen/SuperLU_4.3
      SUPERLULIB      = $(SuperLUroot)/lib/libsuperlu_4.3.a
      TMGLIB          = libtmglib.a
      MKLHOME         = /usr/local/intel/11.1/069/mkl/lib/em64t
      BLASLIB     = -L${MKLHOME} -lmkl_intel_lp64 -lmkl_sequential -lmkl_core
      LIBS        = $(SUPERLULIB) $(BLASLIB)
      ARCH         = ar
      ARCHFLAGS    = cr
      RANLIB       = ranlib
      CC           = /users/ghansen/ompi-gcc/bin/mpicc -fPIC -O3 -march=native
      CFLAGS       = -DPRNTlevel=0
      NOOPTS       =
      FORTRAN      = /users/ghansen/ompi-gcc/bin/mpif90
      FFLAGS       = -O3 fPIC -march=native
      LOADER       = $(CC)
      LOADOPTS     =
      CDEFS        = -DAdd_
      MATLAB       = /usr/sww/matlab
    
  • Build SuperLU

      make -j 4
      cd SRC
      cp *.h /users/ghansen/SuperLU_4.3/include		
    

Build HWLOC

  • HWLOC is an optional package that can be used for thread pinning by Kokkos. If you are not building Kokkos, or if you don't care about thread pinning, please skip.

  • Version 1.11.7

      wget https://www.open-mpi.org/software/hwloc/v1.11/downloads/hwloc-1.11.7.tar.bz2
      tar -xvf hwloc-1.11.7.tar.gz
      cd hwloc-1.11.7
      ./configure CC=/users/ghansen/ompi-gcc/bin/mpicc CXX=/users/ghansen/ompi-gcc/bin/mpicxx --prefix=/users/ghansen
      make -j 4
      make install
    

Building Yaml

  • git clone [email protected]:jbeder/yaml-cpp.git

      GCC_MPI_DIR=/users/ghansen/ompi-gcc
    
      cmake \
          -DCMAKE_CXX_COMPILER:STRING=${GCC_MPI_DIR}/bin/mpicxx \
          -DCMAKE_CXX_FLAGS:STRING='-march=native -O3 -DNDEBUG' \
          -DCMAKE_C_COMPILER:STRING=${GCC_MPI_DIR}/bin/mpicc \
          -DCMAKE_C_FLAGS:STRING='-march=native -O3 -DNDEBUG' \
          -DCMAKE_INSTALL_PREFIX:PATH=/users/ghansen \
          -DCMAKE_BUILD_TYPE:STRING=Release \
          -DBUILD_SHARED_LIBS:BOOL=ON \
          -DYAML_CPP_BUILD_TOOLS:BOOL=OFF \
      ..
    
      make -j 4
      make install
    

Build Trilinos

  • do-configure script in the Albany Repo

  • Make a build directory at the top level of your Trilinos repo clone

      cd Trilinos
      mkdir build
      cd build
    
  • Download the above file as "do-configure" in the above build directory, then make it executable

      chmod +x ./do-configure
    
  • Edit the do-configure script to match your system and above TPL builds

  • Configure and build Trilinos

      ./do-configure
      make -j 4
      make -j 4 install
    

Build Albany

  • CMake configure script in the Albany Repo

  • Make a "build" directory at the top level of the Albany repo clone, download the "do-configure" file, and edit as appropriate

  • Do the build:

      ./do-configure
      make -j 4
      ctest
    
Clone this wiki locally