Skip to content

Conversation

abishekg7
Copy link
Collaborator

In order for MPAS-A OpenACC runs on GPU to remain bit-identical with the CPU runs, we need to use the -Mnofma ( no Fuse-Multiply-Add) switch to the NVHPC CPU build and -Mnofma -gpu=math_uniform for the NVHPC GPU builds. This PR introduces a new compile-time switch NVHPC_BFB to request the CPU and GPU builds have these properties.

Prior to this PR, the -Mnofma was only set inside FFLAGS_ACC, which did nevertheless not apply to CPU builds. This has been fixed. Additionally, with this change, we could potentially remove the -Mnofma option from the optimized builds, and only selectively request it for verifying the GPU results against the CPU reference.

The usage is as follows:

CPU build:

make nvhpc -j4 NVHPC_BFB=true

GPU build:

make nvhpc -j4 OPENACC=true NVHPC_BFB=true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant