Skip to content
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

Build flag to keep nvhpc GPU builds bit-identical with CPU builds #1287

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from

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