From ffb5b8bdc7e845365a9c45a75dd03fa7bbe092af Mon Sep 17 00:00:00 2001 From: suzm10 Date: Fri, 21 Jun 2024 21:10:09 -0400 Subject: [PATCH] see runner --- .github/workflows/phoenix.yml | 35 +++++++++++++++++++++++++++++++++++ .gitignore | 3 ++- examples/case/initcond.F90 | 2 +- install/install.sh | 9 ++++++--- 4 files changed, 44 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/phoenix.yml diff --git a/.github/workflows/phoenix.yml b/.github/workflows/phoenix.yml new file mode 100644 index 0000000..3f2a16d --- /dev/null +++ b/.github/workflows/phoenix.yml @@ -0,0 +1,35 @@ +name: 'Test on Phoenix' + +on: + pull_request: + workflow_dispatch: + +jobs: + self: + name: Phoenix Runner + runs-on: + labels: gt + if: github.repository == 'Comp-Physics/RBC3D' + continue-on-error: true + steps: + - name: Checkout + uses: actions/checkout@v4 + + # use mkl option + - name: Build Packages + run: | + ml gcc mvapich2 mkl python/3.9.12-rkxvr6 netcdf-fortran fftw cmake + ./rbc.sh install + + # will stop on any errors + - name: Compile Cases + run: | + ml gcc mvapich2 mkl python/3.9.12-rkxvr6 netcdf-fortran fftw cmake + set -e -x + export PETSC_DIR=`pwd`/packages/petsc-3.19.6 + export PETSC_ARCH=arch-linux-c-opt + mkdir build + cd build + cmake .. + make + echo "/common and all cases in /examples compiled successfully!" diff --git a/.gitignore b/.gitignore index c31de14..9441771 100644 --- a/.gitignore +++ b/.gitignore @@ -14,4 +14,5 @@ libcommon.a field packages traction -build \ No newline at end of file +build +spherocytes diff --git a/examples/case/initcond.F90 b/examples/case/initcond.F90 index 82ead4c..e235cec 100644 --- a/examples/case/initcond.F90 +++ b/examples/case/initcond.F90 @@ -89,7 +89,7 @@ program InitCond xc(1:2) = 0. xc(3) = lengspacing*(iz - 0.5) print *, 'Xc', iz, xc - + rbc => rbcs(iz) rbc%celltype = 1 call Rbc_Create(rbc, nlat0, dealias) diff --git a/install/install.sh b/install/install.sh index 6be184d..b27d261 100644 --- a/install/install.sh +++ b/install/install.sh @@ -12,9 +12,7 @@ tar -xf petsc-3.19.tar.gz cd petsc-3.19.6 # if these configure options don't work, it's probably a path issue -./configure --with-cc=mpicc \ - --with-cxx=mpicxx \ - --with-fc=mpif90 \ +./configure --with-mpi-dir=$MPI_ROOT \ --with-fortran-datatypes \ --with-debugging=0 \ --COPTFLAGS=-g -O3 -march=native -mtune=native \ @@ -24,6 +22,11 @@ cd petsc-3.19.6 --with-mpiexec=srun \ --with-x11=0 --with-x=0 --with-windows-graphics=0 +if (($?)); then + error "PETSc configure failed" + exit 1 +fi + make PETSC_DIR=`pwd` PETSC_ARCH=arch-linux-c-opt all make PETSC_DIR=`pwd` PETSC_ARCH=arch-linux-c-opt check