You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For $reason I attempted a standalone build of redgreengpu (outside of a bundle) on an NVIDIA GPU machine and link IFS in a bundle build against it. (I can share more details if required.)
In that scenario, ectrans is imported into ifs-source via the CMake config files. The link interfaces in ectrans-targets.cmake include (correctly) CUDA::cufft, CUDA::cublas and OpenACC::OpenACC_Fortran. However, the dependencies to CUDAToolkit and OpenACC are not captured in the corresponding ectrans-import.cmake.
The import file does correctly issue the dependencies on OpenMP and fiat, but from a quick glance I wasn't able to figure out how to achieve the same for OpenACC, CUDA and CUDAToolkit. Manually editing the file and adding the following worked:
if( NOT CMAKE_CUDA_COMPILER_LOADED )
enable_language( CUDA )
endif()
find_dependency( CUDAToolkit )
find_package( OpenACC )
if( OpenACC_Fortran_FOUND AND OpenACC_C_FOUND )
set( OpenACC_FOUND ON )
endif()
For some reason, using find_dependency(OpenACC) did not work and made the entire ectrans import fail. Using instead find_package and doing the usual set(OpenACC_FOUND ON) hack worked.
Presumably, similar issues would appear with HIP on AMD platforms, and are likely affecting the optimised GPU branch, too.
@wdeconinck might have an idea where the CMake needs to be changed for this?
The text was updated successfully, but these errors were encountered:
From my tests of a "find_package( CUDAToolkit )" it is not required that CUDA is enabled as language, so that find_dependency( CUDAToolkit ) should be sufficient.
CUDA should also not be required for find_package( OpenACC )
The reason that find_dependency( OpenACC ) might not have worked here, is when you have this triggered due to
find_package( ectrans REQUIRED )
it then implicitly adds the REQUIRED keyword to all find_dependency: find_dependency( OpenACC REQUIRED ) which fails due to the "usual" workaround issue. That is in fact the only difference between find_package and find_dependency: find_dependency inherits REQUIRED from the parent find_package.
For $reason I attempted a standalone build of redgreengpu (outside of a bundle) on an NVIDIA GPU machine and link IFS in a bundle build against it. (I can share more details if required.)
In that scenario, ectrans is imported into ifs-source via the CMake config files. The link interfaces in ectrans-targets.cmake include (correctly)
CUDA::cufft
,CUDA::cublas
andOpenACC::OpenACC_Fortran
. However, the dependencies to CUDAToolkit and OpenACC are not captured in the correspondingectrans-import.cmake
.The import file does correctly issue the dependencies on OpenMP and fiat, but from a quick glance I wasn't able to figure out how to achieve the same for OpenACC, CUDA and CUDAToolkit. Manually editing the file and adding the following worked:
For some reason, using
find_dependency(OpenACC)
did not work and made the entire ectrans import fail. Using insteadfind_package
and doing the usualset(OpenACC_FOUND ON)
hack worked.Presumably, similar issues would appear with HIP on AMD platforms, and are likely affecting the optimised GPU branch, too.
@wdeconinck might have an idea where the CMake needs to be changed for this?
The text was updated successfully, but these errors were encountered: