-
Notifications
You must be signed in to change notification settings - Fork 5
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
Fix CTests in SYCL runs #153
base: develop
Are you sure you want to change the base?
Conversation
Testing:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please see my comments below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we’d prefer not to change the E3SM machine file in an Omega PR. This change would be better suited for an E3SM PR, and we can downstream the change to Omega afterward.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as the above comment, we can downstream the change from E3SM to Omega.
@@ -44,7 +44,7 @@ if (NOT DEFINED PROJECT_NAME) | |||
|
|||
set(CMAKE_CXX_STANDARD 17) # used in E3SM | |||
set(CMAKE_CXX_STANDARD_REQUIRED ON) | |||
set(LINKER_LANGUAGE C) # needed to support Cray C compiler wrapper | |||
set(LINKER_LANGUAGE CXX) # needed to support Cray C compiler wrapper |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On Frontier, there was an issue with linking to the CXX compiler because mipcxx was set to CXX instead of the CC Cray compiler wrapper. During the linking phase, the Omega compilation failed. Time have passed since then, and a quick build with this change now seems to pass the linking stage, but please ensure that this change works correctly with all compilers on Frontier.
@@ -68,7 +68,7 @@ enum FileFmt { | |||
FmtHDF5 = PIO_IOTYPE_HDF5, ///< native HDF5 format | |||
FmtADIOS = PIO_IOTYPE_ADIOS, ///< ADIOS format | |||
FmtUnknown = -1, ///< Unknown or undefined | |||
FmtDefault = PIO_IOTYPE_NETCDF4C, ///< NetCDF4 is default | |||
FmtDefault = PIO_IOTYPE_PNETCDF, ///< work around HDF5 in SYCL runs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this change, setting the default I/O type to PNETCDF, work on all machines, including Frontier, Perlmutter, and Chrysalis?
@@ -18,14 +18,22 @@ function(add_omega_test test_name exe_name source_files mpi_args) | |||
OmegaLibFlags | |||
) | |||
|
|||
set_target_properties(${exe_name} PROPERTIES LINKER_LANGUAGE C) | |||
set_target_properties(${exe_name} PROPERTIES LINKER_LANGUAGE CXX) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as the above comment about using C linker instead of CXX.
if("${OMEGA_ARCH}" STREQUAL "SYCL") | ||
add_test( | ||
NAME ${test_name} | ||
COMMAND ${OMEGA_MPI_EXEC} ${mpi_args} ${OMEGA_MPI_ARGS} ./${exe_name} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am curious why the order of MPI arguments matters.
if(OMEGA_SYCL_FLAGS) | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OMEGA_SYCL_FLAGS}") | ||
if(SYCL_FLAGS) | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${SYCL_FLAGS}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We want to add the "OMEGA_" prefix to all Omega-related CMake variables and prefer using "OMEGA_SYCL_FLAGS" instead of "SYCL_FLAGS."
@@ -74,6 +74,6 @@ if(OMEGA_BUILD_EXECUTABLE) | |||
OmegaLibFlags | |||
) | |||
|
|||
set_target_properties(${OMEGA_EXE_NAME} PROPERTIES LINKER_LANGUAGE C) | |||
set_target_properties(${OMEGA_EXE_NAME} PROPERTIES LINKER_LANGUAGE CXX) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as the above comment about using C linker instead of CXX.
This PR depends on E3SM-Project#6715 : E3SM tests with cmake changes in this PR appear to be okay. I'll update as soon as this PR is ready. |
de17ea3
to
be5c90c
Compare
Fix CTests in SYCL runs:
-Xsycl-target-backend
to link flagsPIO_IOTYPE_PNETCDF
to work around HDF5 in SYCL runsChecklist