Skip to content

Remove LIBS from openacc_test in top-level Makefile #1154

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

Merged

Conversation

gdicker1
Copy link
Collaborator

Since these OpenACC compilation tests don't depend on NetCDF, GPTL, or other libraries, problems can be prevented by removing the linking commands that come from the LIBS variable. For example, the openacc_test rule will fail and the build will abort if a library the compiler expects to link against hasn't built yet.

Since these OpenACC compilation tests don't depend on NetCDF, GPTL, or
other libraries, problems can be prevented by removing the linking
commands that come from the LIBS variable. For example, the openacc_test
rule will fail and the build will abort if a library the compiler
expects to link against hasn't built yet.
@gdicker1
Copy link
Collaborator Author

This fixes an issue that occurs when builds are attempted with SMIOL and OPENACC=true (assuming a target with valid *_ACC flags in the top-level Makefile). Since the SMIOL library hasn't been built at the early point in the build that the openacc_test rule is attempted, all attempts of these OpenACC compilation tests will fail without some modification to the LIBS variable (or removal of LIBS as this PR does).

E.g. this can be tested on NCAR's Derecho machine with module commands similar to below (note the lack of a module that provides PIO):

 module load ncarenv/23.06
 module load cuda
 module load nvhpc
 module load cray-mpich
 module load cray-libsci
 module load netcdf-mpi
 module load parallel-netcdf
 module load ncarcompilers

and the build command:

make nvhpc CORE=test OPENACC=true

@mgduda mgduda self-requested a review March 26, 2024 20:41
Copy link
Contributor

@mgduda mgduda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With the changes in this PR, I'm now able to build with the NVHPC compilers with SMIOL and with OPENACC=true.

@mgduda mgduda merged commit 04fdc37 into MPAS-Dev:develop Mar 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants