Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenACC port of wave propagation (ACCV6) #6

Merged
merged 31 commits into from
Feb 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
ae322e0
ACCV6
fdisante Nov 17, 2023
bc824f1
Update intel-oneapi install script
wdeconinck Nov 20, 2023
756a754
Some comments and nvtx removed, field_api destructor restored
fdisante Dec 7, 2023
d1bd955
removed comments in propags2
fdisante Dec 10, 2023
6c46fa8
Merge pull request #1 from fdisante1/naan-phys-gpu
fdisante Dec 10, 2023
b555fec
removed comments and guarded use openacc propag_wam - removed/added s…
fdisante Dec 10, 2023
4f6d4f1
removed unused acc data from wamintgr_loki
fdisante Dec 10, 2023
de24c4c
ctuwdrv: restored comment
fdisante Dec 10, 2023
a6090b1
ctuwdrv: restored whitespaces
fdisante Dec 10, 2023
3558443
ctuwdrv: restored whitespaces
fdisante Dec 10, 2023
31a263a
ctuwdrv: restored whitespaces
fdisante Dec 10, 2023
a0d568a
ctuwini: removed commented module, restored dr_hook
fdisante Dec 10, 2023
c655ed2
ctuwupdt: removed commented openacc pragmas
fdisante Dec 10, 2023
dd87579
ctuwupdt: removed commented openacc pragmas and !F
fdisante Dec 10, 2023
d642d66
wamintgr_loki_gpu: FIELD_API destructors restored
fdisante Dec 10, 2023
ed6a9d1
wamintgr_loki_gpu: whitespace removed
fdisante Dec 10, 2023
79988d1
ctuwini: uncommented ZHOOK_HANDLE declaration
fdisante Dec 11, 2023
142659b
ctuwupdt: removed unused module, propag_wam: fixed openacc data pragma
fdisante Dec 11, 2023
6b8301a
ctuw: reverted spaces
fdisante Dec 11, 2023
a8f5c9b
ctuwini: uncommented DR_HOOK reverted spaces
fdisante Dec 11, 2023
a0c9607
cuda aware MPI
fdisante Jan 17, 2024
f78680f
CPU-only ecWAM variant fails validation solved
fdisante Jan 18, 2024
7084540
Using MTHREADS = OMP_GET_MAX_THREADS when openacc activated
fdisante Jan 29, 2024
b7dd9c9
Removed unclosed acc enter data and converted in acc declare
fdisante Jan 29, 2024
d74d1f6
Cleaning code (removing spaces and comments) updated the timestep for…
fdisante Feb 1, 2024
4262014
More cleaning and minor fixing. OMP_GET_MAX_THREADS
fdisante Feb 1, 2024
e422898
removed trailing spaces in the ifdef endif to make gnu compiling succ…
fdisante Feb 1, 2024
fb87ad5
removed use openacc (not needed) to make intel compiling succesfully
fdisante Feb 1, 2024
318594c
proenvhalo ported to GPU
fdisante Feb 8, 2024
d026989
use MTHREADS=1 when OPENACC is activated
fdisante Feb 12, 2024
54e56ef
CTUW: make preprocessor flags lower case
awnawab Feb 14, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .github/tools/install-intel-oneapi.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
#!/bin/sh
#!/usr/bin/env bash

KEY=GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
version=2023.2.0
KEY=GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
wget https://apt.repos.intel.com/intel-gpg-keys/$KEY
sudo apt-key add $KEY
rm $KEY
echo "deb https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
sudo apt-get update
sudo apt-get install \
intel-oneapi-compiler-fortran \
intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic \
intel-oneapi-mpi \
intel-oneapi-mpi-devel \
intel-oneapi-mkl
intel-oneapi-compiler-fortran-$version \
intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic-$version \
intel-oneapi-mpi-devel-2021.10.0 \
intel-oneapi-mkl-$version
9 changes: 4 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ jobs:
name:
- linux gnu-10
- linux clang-12
- linux nvhpc-21.9
- linux intel
- linux intel-classic
- macos

include:
Expand Down Expand Up @@ -74,9 +73,9 @@ jobs:
cmake_options: -DCMAKE_CXX_FLAGS=--diag_suppress177
caching: true

- name : linux intel
- name : linux intel-classic
os: ubuntu-20.04
compiler: intel-oneapi
compiler: intel-classic
compiler_cc: icc
compiler_cxx: icpc
compiler_fc: ifort
Expand Down Expand Up @@ -152,7 +151,7 @@ jobs:
${ECWAM_TOOLS}/install-intel-oneapi.sh
source /opt/intel/oneapi/setvars.sh
printenv >> $GITHUB_ENV
echo "CACHE_SUFFIX=$(icc -dumpversion)" >> $GITHUB_ENV
echo "CACHE_SUFFIX=$CC-$($CC -dumpversion)" >> $GITHUB_ENV

- name: Install MPI
shell: bash -eux {0}
Expand Down
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,12 @@ ecbuild_add_option( FEATURE WAM_GPU
DESCRIPTION "Offload ecWam physics to the GPU"
CONDITION HAVE_FIELD_API )

### CUDA-aware MPI
ecbuild_add_option( FEATURE GPU_AWARE_MPI
DEFAULT OFF
REQUIRED_PACKAGES "MPI COMPONENTS Fortran"
DESCRIPTION "Enable CUDA-aware MPI" )

### check for CUDA
include(CheckLanguage)
check_language(CUDA)
Expand Down
10 changes: 10 additions & 0 deletions src/ecwam/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,10 @@ else()
unset( ${PNAME}_OCEANMODEL_INCLUDE_DIRS )
endif()

if( HAVE_GPU_AWARE_MPI )
list(APPEND ECWAM_DEFINITIONS WITH_GPU_AWARE_MPI )
endif()

# Using dynamic linking creates undefined references to the device
# copies of module global variables
set( LIBRARY_TYPE SHARED )
Expand All @@ -432,6 +436,7 @@ ecbuild_add_library(
${MULTIO_LIBRARIES}
${OpenMP_Fortran_LIBRARIES}
$<${HAVE_FIELD_API}:field_api_${prec}>
MPI::MPI_Fortran
PUBLIC_INCLUDES $<INSTALL_INTERFACE:include>
PRIVATE_INCLUDES ${${PNAME}_OCEANMODEL_INCLUDE_DIRS}
)
Expand Down Expand Up @@ -493,6 +498,7 @@ if( HAVE_WAM_LOKI )
${MULTIO_LIBRARIES}
${OpenMP_Fortran_LIBRARIES}
$<${HAVE_FIELD_API}:field_api_${prec}>
MPI::MPI_Fortran
PUBLIC_INCLUDES $<INSTALL_INTERFACE:include>
PRIVATE_INCLUDES ${${PNAME}_OCEANMODEL_INCLUDE_DIRS} ${CMAKE_CURRENT_SOURCE_DIR}
)
Expand Down Expand Up @@ -537,6 +543,7 @@ if( HAVE_WAM_LOKI )
${MULTIO_LIBRARIES}
${OpenMP_Fortran_LIBRARIES}
$<${HAVE_FIELD_API}:field_api_${prec}>
MPI::MPI_Fortran
PUBLIC_INCLUDES $<INSTALL_INTERFACE:include>
PRIVATE_INCLUDES ${${PNAME}_OCEANMODEL_INCLUDE_DIRS} ${CMAKE_CURRENT_SOURCE_DIR}
)
Expand Down Expand Up @@ -588,6 +595,7 @@ if( HAVE_WAM_LOKI )
${MULTIO_LIBRARIES}
${OpenMP_Fortran_LIBRARIES}
$<${HAVE_FIELD_API}:field_api_${prec}>
MPI::MPI_Fortran
PUBLIC_INCLUDES $<INSTALL_INTERFACE:include>
PRIVATE_INCLUDES ${${PNAME}_OCEANMODEL_INCLUDE_DIRS} ${CMAKE_CURRENT_SOURCE_DIR}
)
Expand Down Expand Up @@ -636,6 +644,7 @@ if( HAVE_WAM_LOKI )
${MULTIO_LIBRARIES}
${OpenMP_Fortran_LIBRARIES}
$<${HAVE_FIELD_API}:field_api_${prec}>
MPI::MPI_Fortran
PUBLIC_INCLUDES $<INSTALL_INTERFACE:include>
PRIVATE_INCLUDES ${${PNAME}_OCEANMODEL_INCLUDE_DIRS} ${CMAKE_CURRENT_SOURCE_DIR}
)
Expand Down Expand Up @@ -684,6 +693,7 @@ if( HAVE_CUDA )
${MULTIO_LIBRARIES}
${OpenMP_Fortran_LIBRARIES}
$<${HAVE_FIELD_API}:field_api_${prec}>
MPI::MPI_Fortran
PUBLIC_INCLUDES $<INSTALL_INTERFACE:include>
PRIVATE_INCLUDES ${${PNAME}_OCEANMODEL_INCLUDE_DIRS} ${CMAKE_CURRENT_SOURCE_DIR}
)
Expand Down
Loading
Loading