Skip to content

Commit

Permalink
pmpi
Browse files Browse the repository at this point in the history
  • Loading branch information
suzanmanasreh committed Jun 13, 2024
1 parent ac11d97 commit fb5d2ad
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:

- name: Build
run: |
ml gcc mvapich2 mkl python/3.9.12-rkxvr6 netcdf-c netcdf-cxx netcdf-fortran fftw
ml gcc mvapich2 mkl petsc python/3.9.12-rkxvr6 netcdf-c netcdf-cxx netcdf-fortran fftw
bash rbc.sh install-with-mkl
- name: Test
Expand Down
10 changes: 3 additions & 7 deletions Makefile.in
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,10 @@
WORK_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))

# Package directories (shouldn't need to change these)
PETSC_DIR = $(WORK_DIR)/packages/petsc-3.19.6
PETSC_ARCH = $(PETSC_DIR)/arch-linux-c-opt
PETSC_DIR = /usr/local/pace-apps/spack/packages/linux-rhel7-x86_64/gcc-10.3.0/petsc-3.17.1-pt6slgja7jrvkmthcu7kuml7vuhpworc

SPHEREPACK_DIR = $(WORK_DIR)/packages/spherepack3.2

LAPACK_DIR = $(WORK_DIR)/packages/lapack-3.11

# Makedependf90 binary
MAKEDEPEND_BIN = $(WORK_DIR)/packages/makedepf90/makedepf90

Expand All @@ -20,18 +17,17 @@ vpath $(WORK_DIR)/common

# Includes
PETSC_INCLUDE = $(PETSC_DIR)/include
PETSC_ARCH_INCLUDE = $(PETSC_ARCH)/include
NETCDF_INCLUDE = $(NETCDF_FORTRANROOT)/include

COMMON_INCLUDE = -I$(WORK_DIR)/common
INCLUDE = $(COMMON_INCLUDE) -I$(PETSC_INCLUDE) -I$(PETSC_ARCH_INCLUDE) -I$(NETCDF_INCLUDE)
INCLUDE = $(COMMON_INCLUDE) -I$(PETSC_INCLUDE) -I$(NETCDF_INCLUDE)

# Libraries
COMMON_LIB = $(WORK_DIR)/common/libcommon.a
SPHPK_LIB = -L$(SPHEREPACK_DIR)/lib -lspherepack
FFTW_LIB = -L$(FFTWROOT)/lib -lfftw3
NETCDF_LIB = -L$(NETCDF_FORTRANROOT)/lib -lnetcdff
PETSC_LIB = -Wl,-rpath,$(PETSC_ARCH)/lib -L$(PETSC_ARCH)/lib -lpetsc -lstdc++
PETSC_LIB = -L$(PETSC_DIR)/lib -lpetsc -lmpi -lpmpi
MKL_LIB = -L$(MKL_ROOT)lib/intel64/ -lmkl_gf_lp64 -lmkl_core -lmkl_sequential -lpthread -lm -ldl
BLAS_LIB = -L$(BLAS_DIR) -lrefblas
LAPACK_LIB = -L$(LAPACK_DIR) -llapack -lrefblas
Expand Down
10 changes: 7 additions & 3 deletions Makefile2.in → Makefile3.in
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@
WORK_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))

# Package directories (shouldn't need to change these)
PETSC_DIR = /usr/local/pace-apps/spack/packages/linux-rhel7-x86_64/gcc-10.3.0/petsc-3.17.1-pt6slgja7jrvkmthcu7kuml7vuhpworc
PETSC_DIR = $(WORK_DIR)/packages/petsc-3.19.6
PETSC_ARCH = $(PETSC_DIR)/arch-linux-c-opt

SPHEREPACK_DIR = $(WORK_DIR)/packages/spherepack3.2

LAPACK_DIR = $(WORK_DIR)/packages/lapack-3.11

# Makedependf90 binary
MAKEDEPEND_BIN = $(WORK_DIR)/packages/makedepf90/makedepf90

Expand All @@ -17,17 +20,18 @@ vpath $(WORK_DIR)/common

# Includes
PETSC_INCLUDE = $(PETSC_DIR)/include
PETSC_ARCH_INCLUDE = $(PETSC_ARCH)/include
NETCDF_INCLUDE = $(NETCDF_FORTRANROOT)/include

COMMON_INCLUDE = -I$(WORK_DIR)/common
INCLUDE = $(COMMON_INCLUDE) -I$(PETSC_INCLUDE) -I$(NETCDF_INCLUDE)
INCLUDE = $(COMMON_INCLUDE) -I$(PETSC_INCLUDE) -I$(PETSC_ARCH_INCLUDE) -I$(NETCDF_INCLUDE)

# Libraries
COMMON_LIB = $(WORK_DIR)/common/libcommon.a
SPHPK_LIB = -L$(SPHEREPACK_DIR)/lib -lspherepack
FFTW_LIB = -L$(FFTWROOT)/lib -lfftw3
NETCDF_LIB = -L$(NETCDF_FORTRANROOT)/lib -lnetcdff
PETSC_LIB = -L$(PETSC_DIR)/lib -lpetsc
PETSC_LIB = -Wl,-rpath,$(PETSC_ARCH)/lib -L$(PETSC_ARCH)/lib -lpetsc -lstdc++
MKL_LIB = -L$(MKL_ROOT)lib/intel64/ -lmkl_gf_lp64 -lmkl_core -lmkl_sequential -lpthread -lm -ldl
BLAS_LIB = -L$(BLAS_DIR) -lrefblas
LAPACK_LIB = -L$(LAPACK_DIR) -llapack -lrefblas
Expand Down
6 changes: 4 additions & 2 deletions install/install-with-mkl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

# salloc a node before you run this because petsc configure uses srun

module unload openmpi
echo -e "export PATH="$PATH:$HOME/.local/bin"" >> ~/.bashrc
source ~/.bashrc

ml python/3.9.12-rkxvr6 gcc mvapich2 mkl netcdf-c netcdf-cxx netcdf-fortran fftw

mpicc -show
Expand Down Expand Up @@ -48,4 +50,4 @@ make PETSC_DIR=`pwd` PETSC_ARCH=arch-linux-c-opt check
# make
# make install

echo "Done installing RBC3D!"
# echo "Done installing RBC3D!"

0 comments on commit fb5d2ad

Please sign in to comment.