Closed brian-eaton closed 10 months ago
And some additional information based on my communication with @brian-eaton : the reason that Brian only needs to turn off the OpenMP options for GNU and Intel compilers is that the -fopenmp
option for these two compilers does not distinguish the OpenMP directives for CPU and GPU somehow. Therefore, these changes are necessary to manually disable the compiler to interpret the OpenMP target offload directives while it is a CPU build. This change is not needed for NVHPC compiler though because NVHPC has distinct options to compile the OpenMP directives for CPU (-mp
option) or GPU (-mp=gpu
option).
In order to build CAM with the RRTMGP code for hybrid parallelization, it is necessary to disable the openmp directives in several RRTMGP files. That's because those directives are intended for running on GPUs and not for use of threads on CPUs. The compilation fails in the RRTMGP files when trying to build for hybrid mode.