Skip to content

Commit

Permalink
Merge pull request #49 from SCOREC/ac/update-cpu-makefile
Browse files Browse the repository at this point in the history
CPU Perlmutter Makefile
  • Loading branch information
onkarsahni authored Jan 30, 2024
2 parents b62e552 + 7fceef7 commit 3c0795d
Show file tree
Hide file tree
Showing 2 changed files with 109 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -549,8 +549,8 @@ build scripts needed for building on the CPU.
```
export root=$PWD
module load cmake/3.22.0
module load cray-hdf5/1.12.2.7
module load cray-netcdf/4.9.0.3
module load cray-hdf5/1.12.2.9
module load cray-netcdf/4.9.0.9
function getname() {
name=$1
Expand Down
107 changes: 107 additions & 0 deletions test/use_at_your_own_risk/MakefilePerlmutterCPU.testFortranInit
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
############################################################################
# The following is an minimal example of the compile and link commands
# needed on Perlmutter. The Perlmutter build of the polyMPO stack followed
# the build instructions in README.md - **no other configuration was tested**.
#
# Using this Makefile on a different system is not advised as it will require
# editing the paths in the first section **and** modifying the compile and link
# arguments. This is not intended to be portable as there is no logic to
# detect/discover compilers and other system software.
#
# This file was generated in Nov 16 2023.
############################################################################


###########################
## edit the following paths
###########################
FC=/usr/bin/gfortran

NETCDF_DIR=/opt/cray/pe/netcdf/4.9.0.9/gnu/12.3/
HDF5_DIR=/opt/cray/pe/hdf5/1.12.2.9/gnu/12.3/
MPI_DIR=/opt/cray/pe/mpich/8.1.28/ofi/gnu/12.3/
CUDA_DIR=/opt/nvidia/hpc_sdk/Linux_x86_64/23.9/cuda/12.2/targets/x86_64-linux/lib

devRoot=/global/homes/c/castia5/cpu-pumi-pic

KOKKOS_DIR=${devRoot}/build-kokkos-perlmutter-cpu/install/
KOKKOS_LIB_DIR=${KOKKOS_DIR}/lib64

OMEGAH_DIR=${devRoot}/build-omegah-perlmutter-cpu/install/

ENGPAR_DIR=${devRoot}/build-engpar-perlmutter-cpu/install/

PUMIPIC_DIR=${devRoot}/build-pumipic-perlmutter-cpu/install/

CABANA_DIR=${devRoot}/build-cabana-perlmutter-cpu/install/

POLYMPO_DIR=${devRoot}/buildPolyMPO-CPU/install

######################################################################################
## Dont't change the following unless you know exactly what you are doing...
## The following was generated from the CMake generated compile and link commands in
## a CUDA disabled build of polyMPO
######################################################################################
POLYMPO_LIBS=\
-L${MPI_DIR}/lib \
-L${CUDA_DIR}/stubs \
-L${CUDA_DIR} \
-Wl,-rpath,${NETCDF_DIR}/lib:${MPI_DIR}/lib: \
${POLYMPO_DIR}/lib/libpolympo_fortran.a \
${POLYMPO_DIR}/lib/libpolyMPO-core.a \
-lm \
${PUMIPIC_DIR}/lib/libpumipic-core.a \
${PUMIPIC_DIR}/lib/libparticleStructs.a \
${PUMIPIC_DIR}/lib/libsupport.a \
${OMEGAH_DIR}/lib64/libomega_h.a \
${KOKKOS_LIB_DIR}/libkokkoscontainers.a \
${KOKKOS_LIB_DIR}/libkokkoscore.a \
-ldl \
${KOKKOS_LIB_DIR}/libkokkossimd.a \
/usr/lib64/libz.so \
${ENGPAR_DIR}/lib/libengpar.a \
${ENGPAR_DIR}/lib/libdiffusive.a \
${ENGPAR_DIR}/lib/libmultilevel.a \
${ENGPAR_DIR}/lib/libengpar_metrics.a \
${ENGPAR_DIR}/lib/libcoloring.a \
${ENGPAR_DIR}/lib/libagi.a \
${ENGPAR_DIR}/lib/libengpar_support.a \
${ENGPAR_DIR}/lib/libpcu.a \
${NETCDF_DIR}/lib/libnetcdf.so \
${POLYMPO_DIR}/lib/libpolympo_fortran.a \
${MPI_DIR}/lib/libmpifort_gnu_123.so \
${MPI_DIR}/lib/libmpi_gnu_123.so \
${NETCDF_DIR}/lib/libnetcdff.so \
-lmpi_gnu_123 \
-lcudadevrt \
-lcudart_static \
-lrt \
-lpthread \
-ldl \
-lstdc++

POLYMPO_COMPILE_FLAGS=\
-DFP64 \
-DKOKKOS_ENABLED \
-DLOCAL_ID_FTYPE=C_INT32_T \
-DLOCAL_ID_TYPE=int32_t \
-DPP_ENABLE_CAB \
-I${devRoot}/polyMPO/src \
-I${devRoot}/polyMPO/test \
-I${devRoot}/buildPolyMPO-CPU/src \
-I${PUMIPIC_DIR}/include \
-I${KOKKOS_DIR}/include \
-I${CABANA_DIR}/include \
-I${OMEGAH_DIR}/include \
-I/usr/include \
-I${ENGPAR_DIR}/include \
-I${MPI_DIR}/include \
-I${NETCDF_DIR}/include \
-I${HDF5_DIR}/include \
-g -J${devRoot}/buildPolyMPO-CPU/mod_files

testFortranInit: testFortranInit.o
${FC} testFortranInit.o -o testFortranInit ${POLYMPO_LIBS}

testFortranInit.o: testFortranInit.f90
${FC} ${POLYMPO_COMPILE_FLAGS} -c testFortranInit.f90 -o testFortranInit.o

0 comments on commit 3c0795d

Please sign in to comment.