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

loki_transform for CUF variants, bundle.yml fixup #99

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion bundle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ options :
cmake : SYCL_SUB_GROUP_SIZE={{value}}

- cloudsc-cpp-math :
help : [C|STD|SYCL]
help : "Specify the math function interfaces to use in C++ (device) kernels. Available options: C, STD, SYCL"
cmake : CLOUDSC_CPP_MATH={{value}}

- with-mpi :
Expand Down
46 changes: 27 additions & 19 deletions src/cloudsc_loki/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ if( HAVE_CLOUDSC_LOKI )
)
# Set specific module directory to avoid aliasing of .mod files
set_target_properties( dwarf-cloudsc-loki-idem
PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/loki-idem
PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/loki-idem
)

ecbuild_add_test(
Expand Down Expand Up @@ -157,7 +157,7 @@ if( HAVE_CLOUDSC_LOKI )
)
# Set specific module directory to avoid aliasing of .mod files
set_target_properties( dwarf-cloudsc-loki-idem-stack
PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/loki-idem-stack
PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/loki-idem-stack
)


Expand Down Expand Up @@ -244,7 +244,7 @@ if( HAVE_CLOUDSC_LOKI )
)
# Set specific module directory to avoid aliasing of .mod files
set_target_properties( dwarf-cloudsc-loki-sca
PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/loki-sca
PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/loki-sca
)

ecbuild_add_test(
Expand Down Expand Up @@ -489,7 +489,7 @@ if( HAVE_CLOUDSC_LOKI )
)
# Set specific module directory to avoid aliasing of .mod files
set_target_properties( dwarf-cloudsc-loki-scc
PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/loki-scc
PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/loki-scc
)


Expand Down Expand Up @@ -547,7 +547,7 @@ if( HAVE_CLOUDSC_LOKI )
)
# Set specific module directory to avoid aliasing of .mod files
set_target_properties( dwarf-cloudsc-loki-scc-stack
PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/loki-scc-stack
PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/loki-scc-stack
)


Expand Down Expand Up @@ -611,7 +611,7 @@ if( HAVE_CLOUDSC_LOKI )
)
# Set specific module directory to avoid aliasing of .mod files
set_target_properties( dwarf-cloudsc-loki-scc-hoist
PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/loki-scc-hoist
PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/loki-scc-hoist
)

ecbuild_add_test(
Expand All @@ -637,20 +637,24 @@ if( HAVE_CLOUDSC_LOKI )
if( HAVE_CUDA )

# scc-cuf-parametrise
loki_transform_convert(
MODE cuf-parametrise FRONTEND ${LOKI_FRONTEND} CPP
loki_transform(
COMMAND convert
MODE cuf-parametrise
FRONTEND ${LOKI_FRONTEND}
CPP
CONFIG ${CMAKE_CURRENT_SOURCE_DIR}/cloudsc_cuf_loki.config
PATH ${CMAKE_CURRENT_SOURCE_DIR}
SOURCES ${CMAKE_CURRENT_SOURCE_DIR}
HEADERS
${COMMON_MODULE}/yomcst.F90
${COMMON_MODULE}/yomphyder.F90
${COMMON_MODULE}/yoethf.F90
${COMMON_MODULE}/yoecldp.F90
INCLUDES ${COMMON_INCLUDE}
DEFINITIONS CLOUDSC_GPU_TIMING
DATA_OFFLOAD REMOVE_OPENMP
DATA_OFFLOAD
REMOVE_OPENMP
XMOD ${_TARGET_XMOD_DIR} ${XMOD_DIR}
OUTPATH ${CMAKE_CURRENT_BINARY_DIR}/loki-scc-cuf-parametrise
BUILDDIR ${CMAKE_CURRENT_BINARY_DIR}/loki-scc-cuf-parametrise
OUTPUT
loki-scc-cuf-parametrise/cuf_cloudsc_driver_loki_mod.cuf_parametrise.F90
loki-scc-cuf-parametrise/cuf_cloudsc.cuf_parametrise.F90
Expand All @@ -674,7 +678,7 @@ if( HAVE_CUDA )
)
# Set specific module directory to avoid aliasing of .mod files
set_target_properties( dwarf-cloudsc-loki-scc-cuf-parametrise
PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/loki-scc-cuf-parametrise
PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/loki-scc-cuf-parametrise
)

target_link_options(dwarf-cloudsc-loki-scc-cuf-parametrise PUBLIC "-cuda")
Expand All @@ -688,24 +692,28 @@ if( HAVE_CUDA )
)

# scc-cuf-hoist
loki_transform_convert(
MODE cuf-hoist FRONTEND ${LOKI_FRONTEND} CPP
loki_transform(
COMMAND convert
MODE cuf-hoist
FRONTEND ${LOKI_FRONTEND}
CPP
CONFIG ${CMAKE_CURRENT_SOURCE_DIR}/cloudsc_cuf_loki.config
PATH ${CMAKE_CURRENT_SOURCE_DIR}
SOURCES ${CMAKE_CURRENT_SOURCE_DIR}
HEADERS
${COMMON_MODULE}/yomcst.F90
${COMMON_MODULE}/yomphyder.F90
${COMMON_MODULE}/yoethf.F90
${COMMON_MODULE}/yoecldp.F90
INCLUDES ${COMMON_INCLUDE}
DEFINITIONS CLOUDSC_GPU_TIMING
DATA_OFFLOAD REMOVE_OPENMP
DATA_OFFLOAD
REMOVE_OPENMP
XMOD ${_TARGET_XMOD_DIR} ${XMOD_DIR}
OUTPATH ${CMAKE_CURRENT_BINARY_DIR}/loki-scc-cuf-hoist
BUILDDIR ${CMAKE_CURRENT_BINARY_DIR}/loki-scc-cuf-hoist
OUTPUT
loki-scc-cuf-hoist/cuf_cloudsc_driver_loki_mod.cuf_hoist.F90
loki-scc-cuf-hoist/cuf_cloudsc.cuf_hoist.F90
DEPENDS cuf_cloudsc.F90 cuf_cloudsc_driver_loki_mod.F90 ${_OMNI_DEPENDENCIES}
DEPENDS cuf_cloudsc.F90 cuf_cloudsc_driver_loki_mod.F90 ${_OMNI_DEPENDENCIES}
)

set_source_files_properties(
Expand All @@ -725,7 +733,7 @@ if( HAVE_CUDA )
)
# Set specific module directory to avoid aliasing of .mod files
set_target_properties( dwarf-cloudsc-loki-scc-cuf-hoist
PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/loki-scc-cuf-hoist
PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/loki-scc-cuf-hoist
)

target_link_options(dwarf-cloudsc-loki-scc-cuf-hoist PUBLIC "-cuda")
Expand Down