diff --git a/.github/workflows/phoenix.yml b/.github/workflows/phoenix.yml index b9437b3..ef72948 100644 --- a/.github/workflows/phoenix.yml +++ b/.github/workflows/phoenix.yml @@ -18,9 +18,8 @@ jobs: # use mkl option - name: Build Packages run: | - ml gcc/12.1.0-qgxpzk mvapich2/2.3.7-733lcv - ml intel-oneapi-mkl/2022.1.0-oqnlkn python/3.9.12-rkxvr6 - ./rbc.sh install + ml gcc/12.1.0-qgxpzk mvapich2/2.3.7-733lcv python/3.9.12-rkxvr6 netcdf-fortran fftw cmake + ./rbc.sh install-lapack # will stop on any errors - name: Compile Cases diff --git a/install/install-lapack.sh b/install/install-lapack.sh new file mode 100644 index 0000000..29f093c --- /dev/null +++ b/install/install-lapack.sh @@ -0,0 +1,49 @@ +#!/bin/bash + +# salloc a node before you run this because petsc tests use srun + +# create packages directory +mkdir packages +cd packages + +# build and install lapack and blas +wget https://github.com/Reference-LAPACK/lapack/archive/refs/tags/v3.11.tar.gz +tar -xf v3.11.tar.gz +cd lapack-3.11 +cp ../../install/scripts/make.inc ./ +echo "PWD: `PWD`" +make -j 8 + +cd .. +# build and install petsc 3.19.6 in packages directory +wget https://ftp.mcs.anl.gov/pub/petsc/petsc-3.19.tar.gz +tar -xf petsc-3.19.tar.gz + +parentdir="$(dirname `pwd`)" +echo "parentdir: $parentdir" + +cd petsc-3.19.6 +./configure --with-cc=mpicc \ + --with-cxx=mpicxx \ + --with-fc=mpif90 \ + --with-fortran-datatypes \ + --with-debugging=0 \ + --COPTFLAGS=-g -O3 -march=native -mtune=native \ + --CXXOPTFLAGS=-g -O3 -march=native -mtune=native \ + --FOPTFLAGS=-g -O3 -march=native -mtune=native \ + --with-blas-lib=$parentdir/packages/lapack-3.11/librefblas.a \ + --with-lapack-lib=$parentdir/packages/lapack-3.11/liblapack.a \ + --with-mpiexec=srun \ + --with-shared-libraries=0 \ + --with-x11=0 --with-x=0 --with-windows-graphics=0 + +make PETSC_DIR=`pwd` PETSC_ARCH=arch-linux-c-opt all +make PETSC_DIR=`pwd` PETSC_ARCH=arch-linux-c-opt check + +# build and install spherepack +cd .. +git clone https://github.com/comp-physics/spherepack3.2.git +cd spherepack3.2 +make -j 8 + +echo "Done installing RBC3D!" \ No newline at end of file diff --git a/install/install.sh b/install/install.sh index 6a03a2e..5320129 100644 --- a/install/install.sh +++ b/install/install.sh @@ -20,7 +20,7 @@ cd petsc-3.19.6 --COPTFLAGS=-g -O3 -march=native -mtune=native \ --CXXOPTFLAGS=-g -O3 -march=native -mtune=native \ --FOPTFLAGS=-g -O3 -march=native -mtune=native \ - --with-blaslapack-dir=$INTEL_ONEAPI_MKLROOT \ + --with-blaslapack-dir=$MKLROOT \ --with-mpiexec=srun \ --with-x11=0 --with-x=0 --with-windows-graphics=0 diff --git a/rbc.sh b/rbc.sh index 2fff5c0..3ccca63 100755 --- a/rbc.sh +++ b/rbc.sh @@ -27,6 +27,10 @@ if [ "$1" == 'install' ]; then . "$(pwd)/install/install.sh" $@; exit fi +if [ "$1" == 'install-lapack' ]; then + . "$(pwd)/install/install-lapack.sh" $@; exit +fi + if [ "$1" == 'install-makedepf90' ]; then . "$(pwd)/install/install-makedepf90.sh" $@; exit fi