if (COMP_NAME STREQUAL gptl) string(APPEND CPPDEFS " -DHAVE_NANOTIME -DBIT64 -DHAVE_SLASHPROC -DHAVE_GETTIMEOFDAY") endif() if (NOT DEBUG) string(APPEND CFLAGS " -O2 -Mvect=nosimd") endif() if (NOT DEBUG) string(APPEND FFLAGS " -O2 -Mvect=nosimd -acc -gpu=cc80,cc70,deepcopy -Mcuda -Minfo=accel") endif() #string(APPEND LDFLAGS " -Minline -ta=nvidia,cc80,cuda11.2,ptxinfo -Mcuda -Minfo=accel") string(APPEND LDFLAGS " -Minline -gpu=cc80,cc70,deepcopy -Mcuda -Minfo=accel") execute_process(COMMAND $ENV{NETCDF_FORTRAN_PATH}/bin/nf-config --flibs OUTPUT_VARIABLE SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0 OUTPUT_STRIP_TRAILING_WHITESPACE) string(APPEND SLIBS " ${SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0} -L$ENV{PNETCDF_PATH}/lib -lpnetcdf -lhdf5_hl -lhdf5 -lnetcdf -lnetcdff -L/opt/nvidia/hpc_sdk/Linux_x86_64/21.9/compilers/lib -llapack -lblas") #set(KOKKOS_OPTIONS "--with-cuda=$ENV{CUDA_DIR} --with-cuda-options=enable_lambda") string(APPEND KOKKOS_OPTIONS " -DKokkos_ARCH_POWER9=On -DKokkos_ARCH_VOLTA70=On -DKokkos_ENABLE_CUDA=On -DKokkos_ENABLE_CUDA_LAMBDA=On") execute_process(COMMAND $ENV{NETCDF_C_PATH}/bin/nc-config --libs OUTPUT_VARIABLE SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0 OUTPUT_STRIP_TRAILING_WHITESPACE) execute_process(COMMAND $ENV{PNETCDF_PATH}/bin/pnetcdf-config --libs OUTPUT_VARIABLE SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0 OUTPUT_STRIP_TRAILING_WHITESPACE) string(APPEND SLIBS " ${SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0}") set(SUPPORTS_CXX "TRUE") set(CXX_LINKER "FORTRAN") set(CXX_LIBS "-lstdc++") set(NETCDF_C_PATH "$ENV{NETCDF_C_PATH}") set(NETCDF_FORTRAN_PATH "$ENV{NETCDF_FORTRAN_PATH}") set(PNETCDF_PATH "$ENV{PNETCDF_PATH}") set(MPICC "mpicc") set(MPICXX "mpiCC") set(MPIFC "mpif90") set(SCC "pgcc") set(SCXX "pgc++") set(SFC "pgfortran") string(APPEND CPPDEFS " -DFORTRANUNDERSCORE -DNO_R16 -DCPRNVIDIA") string(APPEND LDFLAGS " -time -Wl,--allow-multiple-definition -acc")