Skip to content

Commit

Permalink
lapack
Browse files Browse the repository at this point in the history
  • Loading branch information
suzanmanasreh committed Jun 22, 2024
1 parent 24f3dcb commit 935fd93
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 4 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/phoenix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
49 changes: 49 additions & 0 deletions install/install-lapack.sh
Original file line number Diff line number Diff line change
@@ -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!"
2 changes: 1 addition & 1 deletion install/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 4 additions & 0 deletions rbc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 935fd93

Please sign in to comment.