Installation¶
Instructions for installing both PETSc and PetIGA on Bridges2 cluster are provided here.
PETSc¶
Download PETSc
Load required modules on the cluster:
module load gcc/10.2.0 openmpi/4.0.5-gcc10.2.0 module load mkl
Set optimization flags. Tune the optimization flags as per your requirements.:
OPTFLAGS="-O3"
Configure PETSc on bridges2 with the appropriate options. Below is an example:
./configure --with-cc=mpiicc --with-cxx=mpiicpc --with-fc=mpiifort --download-sowing-cc=mpiicc --download-sowing-cxx=mpiicpc --with-scalar-type=real --with-shared-libraries=0 --with-debugging=no --with-blas-lapack-dir=$MKLROOT --with-scalapack-lib="-L$MKLROOT/lib/intel64 -lmkl_scalapack_lp64 -lmkl_blacs_openmpi_lp64" --with-scalapack-include=$MKLROOT/include COPTFLAGS="$OPTFLAGS" CXXOPTFLAGS="$OPTFLAGS" FOPTFLAGS="$OPTFLAGS" --download-metis --download-parmetis --download-spooles --download-superlu_dist=yes PETSC_ARCH=<arch_name>
Compile PETSc: Once the configuration is complete, follow the output instructions to finish compiling the library.
Set environment variables: Save the environment variables
PETSC_DIRandPETSC_ARCHinto your.bashrcso that they are always set in your environment.Verify installation:
make PETSC_DIR=<path_to_petsc> PETSC_ARCH=<arch_name> check
PetIGA¶
Download PetIGA
Set the
PETIGA_DIRenvironment variable to the correctly downloaded location and change to the appropriate directory:cd $PETIGA_DIR
Compile PetIGA:
make PETSC_DIR=<path_to_petsc> PETSC_ARCH=<arch_name> all
Verify installation:
make PETSC_DIR=<path_to_petsc> PETSC_ARCH=<arch_name> test