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

Fix OpenMP support for MPAS standalone builds with cray-cray #6193

Merged

Conversation

xylar
Copy link
Contributor

@xylar xylar commented Jan 30, 2024

A -fopenmp (rather than a -homp) flag seems to be needed for OpenMP on Frontier.

For MPAS component standalone builds only -- does not impact E3SM

[BFB]

@xylar
Copy link
Contributor Author

xylar commented Jan 30, 2024

Testing

I'm able to build standalone MPAS-Ocean with make cray-cray OPENMP=true with this branch on Frontier, whereas I see:

...
Testing compiler for OpenMP support
clang-15: warning: argument unused during compilation: '-h noacc' [-Wunused-command-line-argument]
clang-15: warning: argument unused during compilation: '-h omp' [-Wunused-command-line-argument]
ld.lld: error: undefined symbol: omp_get_num_threads
>>> referenced by conftest.c
>>>               /tmp/conftest-f9b2d4.o:(main)
clang-15: error: linker command failed with exit code 1 (use -v to see invocation)
cc does not support OpenMP - see INSTALL in top-level directory for more information
make[1]: *** [Makefile:939: openmp_test] Error 1
make[1]: Leaving directory '/autofs/nccs-svm1_home1/xylar/e3sm_work/polaris/add-omega-ctest-util/e3sm_submodules/crayclang/components/mpas-ocean'
make: *** [Makefile:444: cray-cray] Error 2

without these changes.

I was also able to run the pr suite from Polaris using MPAS-Ocean build with this branch. Most tests ran successfully and the failure in inertial_gravity_wave is unrelated to this fix. (I have made a fix to Polaris to the parallel config options for Frontier to use one thread per core.)

Copy link
Contributor

@philipwjones philipwjones left a comment

Choose a reason for hiding this comment

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

I have reproduced the bug and verified that this change does indeed fix the build.

@xylar
Copy link
Contributor Author

xylar commented Jan 30, 2024

Thanks @philipwjones! That was fast!

@jonbob jonbob added the BFB PR leaves answers BFB label Feb 7, 2024
@jonbob jonbob changed the title [MPAS-Standalone] Fix OpenMP support with cray-cray Fix OpenMP support for MPAS standalone component builds with cray-cray Feb 7, 2024
@jonbob jonbob changed the title Fix OpenMP support for MPAS standalone component builds with cray-cray Fix OpenMP support for MPAS standalone builds with cray-cray Feb 7, 2024
jonbob added a commit that referenced this pull request Feb 7, 2024
…#6193)

Fix OpenMP support for MPAS standalone builds with cray-cray

A -fopenmp (rather than a -homp) flag seems to be needed for OpenMP on
Frontier.

For MPAS component standalone builds only -- does not impact E3SM

[BFB]
@jonbob
Copy link
Contributor

jonbob commented Feb 7, 2024

passes:

  • ERS.ne30pg2_r05_EC30to60E2r2.GPMPAS-JRA.chrysalis_intel.mosart-rof_ocn_2way
  • SMS_D_Ld3.T62_oQU120.CMPASO-IAF.chrysalis_intel

merged to next

@jonbob jonbob merged commit abe7218 into E3SM-Project:master Feb 8, 2024
3 checks passed
@jonbob
Copy link
Contributor

jonbob commented Feb 8, 2024

merged to master

@xylar xylar deleted the mpas-framework/fix-cray-cray-openmp branch February 11, 2024 13:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants