#!/bin/bash export INTEL_LICENSE_FILE=/work/tools/intel/Intel_TeamLicense_Linux.lic source /work/tools/intel/composer_xe_2018_4/compilers_and_libraries_2018.5.274/linux/bin/compilervars.sh intel64 -platform linux PETSC_SRC_PATH=/usr/local/share/petsc/src PETSC_INSTALL_BASE=$1 mkdir -p $PETSC_INSTALL_BASE # Configure PETSc ./configure \ --prefix=${PETSC_INSTALL_BASE} \ --with-debugging=0 \ COPTFLAGS="-O3 -mtune=generic" \ CXXOPTFLAGS="-O3 -mtune=generic" \ FOPTFLAGS="-O3 -mtune=generic" \ --with-ssl=0 \ --with-x=0 \ --with-fortran-bindings=0 \ --with-shared-libraries=1 \ --with-cudac=0 \ --with-scalar-type=real \ --download-f2cblaslapack \ --download-metis \ --download-mpich \ --download-ptscotch \ --download-superlu \ --download-suitesparse \ --download-scalapack \ --with-cc=icc \ --with-cxx=icpc \ --with-fc=gfortran # Build and install make all ## make test make install # Add executable in PATH export PATH=${PETSC_INSTALL_BASE}/bin:${PETSC_INSTALL_BASE}/lib/petsc/bin:$PATH export PETSC_DIR=${PETSC_INSTALL_BASE} export PETSC_ARCH=linux-c-opt