|
| 1 | +############################################################################ |
| 2 | +# The following is an minimal example of the compile and link commands |
| 3 | +# needed on Perlmutter. The Perlmutter build of the polyMPO stack followed |
| 4 | +# the build instructions in README.md - **no other configuration was tested**. |
| 5 | +# |
| 6 | +# Using this Makefile on a different system is not advised as it will require |
| 7 | +# editing the paths in the first section **and** modifying the compile and link |
| 8 | +# arguments. This is not intended to be portable as there is no logic to |
| 9 | +# detect/discover compilers and other system software. |
| 10 | +# |
| 11 | +# This file was generated in Nov 16 2023. |
| 12 | +############################################################################ |
| 13 | + |
| 14 | + |
| 15 | +########################### |
| 16 | +## edit the following paths |
| 17 | +########################### |
| 18 | +FC=/usr/bin/gfortran |
| 19 | + |
| 20 | +NETCDF_DIR=/opt/cray/pe/netcdf/4.9.0.9/gnu/12.3/ |
| 21 | +HDF5_DIR=/opt/cray/pe/hdf5/1.12.2.9/gnu/12.3/ |
| 22 | +MPI_DIR=/opt/cray/pe/mpich/8.1.28/ofi/gnu/12.3/ |
| 23 | +CUDA_DIR=/opt/nvidia/hpc_sdk/Linux_x86_64/23.9/cuda/12.2/targets/x86_64-linux/lib |
| 24 | + |
| 25 | +devRoot=/global/homes/c/castia5/cpu-pumi-pic |
| 26 | + |
| 27 | +KOKKOS_DIR=${devRoot}/build-kokkos-perlmutter-cpu/install/ |
| 28 | +KOKKOS_LIB_DIR=${KOKKOS_DIR}/lib64 |
| 29 | + |
| 30 | +OMEGAH_DIR=${devRoot}/build-omegah-perlmutter-cpu/install/ |
| 31 | + |
| 32 | +ENGPAR_DIR=${devRoot}/build-engpar-perlmutter-cpu/install/ |
| 33 | + |
| 34 | +PUMIPIC_DIR=${devRoot}/build-pumipic-perlmutter-cpu/install/ |
| 35 | + |
| 36 | +CABANA_DIR=${devRoot}/build-cabana-perlmutter-cpu/install/ |
| 37 | + |
| 38 | +POLYMPO_DIR=${devRoot}/buildPolyMPO-CPU/install |
| 39 | + |
| 40 | +###################################################################################### |
| 41 | +## Dont't change the following unless you know exactly what you are doing... |
| 42 | +## The following was generated from the CMake generated compile and link commands in |
| 43 | +## a CUDA disabled build of polyMPO |
| 44 | +###################################################################################### |
| 45 | +POLYMPO_LIBS=\ |
| 46 | +-L${MPI_DIR}/lib \ |
| 47 | +-L${CUDA_DIR}/stubs \ |
| 48 | +-L${CUDA_DIR} \ |
| 49 | +-Wl,-rpath,${NETCDF_DIR}/lib:${MPI_DIR}/lib: \ |
| 50 | +${POLYMPO_DIR}/lib/libpolympo_fortran.a \ |
| 51 | +${POLYMPO_DIR}/lib/libpolyMPO-core.a \ |
| 52 | +-lm \ |
| 53 | +${PUMIPIC_DIR}/lib/libpumipic-core.a \ |
| 54 | +${PUMIPIC_DIR}/lib/libparticleStructs.a \ |
| 55 | +${PUMIPIC_DIR}/lib/libsupport.a \ |
| 56 | +${OMEGAH_DIR}/lib64/libomega_h.a \ |
| 57 | +${KOKKOS_LIB_DIR}/libkokkoscontainers.a \ |
| 58 | +${KOKKOS_LIB_DIR}/libkokkoscore.a \ |
| 59 | +-ldl \ |
| 60 | +${KOKKOS_LIB_DIR}/libkokkossimd.a \ |
| 61 | +/usr/lib64/libz.so \ |
| 62 | +${ENGPAR_DIR}/lib/libengpar.a \ |
| 63 | +${ENGPAR_DIR}/lib/libdiffusive.a \ |
| 64 | +${ENGPAR_DIR}/lib/libmultilevel.a \ |
| 65 | +${ENGPAR_DIR}/lib/libengpar_metrics.a \ |
| 66 | +${ENGPAR_DIR}/lib/libcoloring.a \ |
| 67 | +${ENGPAR_DIR}/lib/libagi.a \ |
| 68 | +${ENGPAR_DIR}/lib/libengpar_support.a \ |
| 69 | +${ENGPAR_DIR}/lib/libpcu.a \ |
| 70 | +${NETCDF_DIR}/lib/libnetcdf.so \ |
| 71 | +${POLYMPO_DIR}/lib/libpolympo_fortran.a \ |
| 72 | +${MPI_DIR}/lib/libmpifort_gnu_123.so \ |
| 73 | +${MPI_DIR}/lib/libmpi_gnu_123.so \ |
| 74 | +${NETCDF_DIR}/lib/libnetcdff.so \ |
| 75 | +-lmpi_gnu_123 \ |
| 76 | +-lcudadevrt \ |
| 77 | +-lcudart_static \ |
| 78 | +-lrt \ |
| 79 | +-lpthread \ |
| 80 | +-ldl \ |
| 81 | +-lstdc++ |
| 82 | + |
| 83 | +POLYMPO_COMPILE_FLAGS=\ |
| 84 | +-DFP64 \ |
| 85 | +-DKOKKOS_ENABLED \ |
| 86 | +-DLOCAL_ID_FTYPE=C_INT32_T \ |
| 87 | +-DLOCAL_ID_TYPE=int32_t \ |
| 88 | +-DPP_ENABLE_CAB \ |
| 89 | +-I${devRoot}/polyMPO/src \ |
| 90 | +-I${devRoot}/polyMPO/test \ |
| 91 | +-I${devRoot}/buildPolyMPO-CPU/src \ |
| 92 | +-I${PUMIPIC_DIR}/include \ |
| 93 | +-I${KOKKOS_DIR}/include \ |
| 94 | +-I${CABANA_DIR}/include \ |
| 95 | +-I${OMEGAH_DIR}/include \ |
| 96 | +-I/usr/include \ |
| 97 | +-I${ENGPAR_DIR}/include \ |
| 98 | +-I${MPI_DIR}/include \ |
| 99 | +-I${NETCDF_DIR}/include \ |
| 100 | +-I${HDF5_DIR}/include \ |
| 101 | +-g -J${devRoot}/buildPolyMPO-CPU/mod_files |
| 102 | + |
| 103 | +testFortranInit: testFortranInit.o |
| 104 | + ${FC} testFortranInit.o -o testFortranInit ${POLYMPO_LIBS} |
| 105 | + |
| 106 | +testFortranInit.o: testFortranInit.f90 |
| 107 | + ${FC} ${POLYMPO_COMPILE_FLAGS} -c testFortranInit.f90 -o testFortranInit.o |
0 commit comments