Closed michalakes closed 1 year ago
@michalakes The snippet of code above from CMakeLists.txt appears to be from the v5 release? CMakeLists has been updated for CCPP v6.
@michalakes The snippet of code above from CMakeLists.txt appears to be from the v5 release? CMakeLists has been updated for CCPP v6.
Thanks, Dustin. I think with NEPTUNE we've got a V6/V5 chimera at the CMake level. I found a workaround, for now, that involved recovering the errant detect_openmp.cmake from V5 and adding it back to our patchwork around V6. I think it's our problem so this issue can be closed, but before I do that, a follow up, please:
Background: We need for CCPP to be compiled without OpenMP, even when NEPTUNE is compiled with OpenMP. For the Intel compiler, we do need the -auto flag but not -qopenmp. That's because we have the threading at a higher level, above the calls to CCPP. We expect the code inside CCPP to run single threaded on each higher-level thread that it's called. The problem we ran into in V6 was that CMake was seeing OPENMP set to true in the environment and then compiling it with -qopenmp. After a couple days of hunting I see that we had put a line into the V5 detect_openmp.cmake that specifically omitted -qopenmp from the Fortran flags. When detect_openmp.cmake went missing, so did that work-around.
So the questions:
!$omp target
directives.If you prefer, I could close the issue now and we could discuss this offline. Thanks for your reply!
John
I am closing this issue. We found a fix that does not require the detect_openmp.cmake file or any other modifications to submodules that NEPTUNE gets from CCPP.
Description
Compiling ccppV6 as part of NEPTUNE build, we now get an error:
I don't think we had this problem with ccpp v5
Steps to Reproduce
I'm not sure what the non-NEPTUNE to reproduce this is, but it's happening as a result of the command:
in our NEPTUNE build.
Additional Context
Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions.
Output
I'm attaching a screenshot of the line 116 in CMakeLists that's referred to in the error message, above.![screenshot](https://user-images.githubusercontent.com/8060975/204398013-3f1dc0f6-9a84-4a73-bd6f-50848377dfd3.png)