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 MPAS standalone compile issues #6134

Conversation

mark-petersen
Copy link
Contributor

@mark-petersen mark-petersen commented Jan 2, 2024

These two small changes allow MPAS components to compile in stand-alone mode. It should not affect E3SM compile or simulations. The fixes are:

  1. A missing endif was added to the Makefile
  2. A redundant corelist declaration was removed from mpas.F because it was added to mpas_subdriver.F in PR Introduce MOAB coupler interfaces and update moab driver #5979, and the subdriver is used by mpas.F.

These fixes should work for ocean, sea ice, and MALI cores.

Fixes #6133
Fixes #6138
[BFB]

@mark-petersen
Copy link
Contributor Author

With these changes, MPAS-Ocean standalone compiles with gnu debug on chrysalis and chicoma and passes the nightly test suite on both. I can successfully compile mpas-seaice with gnu debug. I was not able to compile MALI, but I'm not familiar with it, so probably did it wrong.

@mark-petersen
Copy link
Contributor Author

This PR also compiles MPAS-Ocean with intel debug on chrysalis and passes the nightly test suite. MALI compiles successfully with intel on chrysalis but not gnu.

@xylar
Copy link
Contributor

xylar commented Jan 2, 2024

I'm also not able to build MALI on Chrysalis with gnu. I'm using a compass load script with albany support. When I run:

make ALBANY=true gfortran

I see:

gcc -D_MPI -DUSE_PIO2 -DHAVE_ADIOS -DCORE_LANDICE -DUSE_EXTERNAL_FIRSTORDER -DMPAS_LI_BUILD_INTERFACE -DMPAS_NAMELIST_SUFFIX=landice -DMPAS_EXE_NAME=landice_model -DMPAS_OPENMP -DMPAS_NATIVE_TIMERS -DMPAS_GIT_VERSION=v2.1.0-11503-g1496cabcea -O3 -m64 -fopenmp -I../../external/ezxml -o namelist_gen namelist_gen.o test_functions.o ../../external/ezxml/ezxml.o
namelist_gen.o: In function `main':
namelist_gen.c:(.text+0x27): undefined reference to `__intel_new_feature_proc_init'
namelist_gen.c:(.text+0x44): undefined reference to `__kmpc_begin'
namelist_gen.c:(.text+0x104): undefined reference to `__intel_sse2_strdup'
namelist_gen.c:(.text+0x356): undefined reference to `__intel_sse2_strdup'
namelist_gen.c:(.text+0x42c): undefined reference to `__kmpc_end'
namelist_gen.c:(.text+0x4bd): undefined reference to `__kmpc_end'
namelist_gen.c:(.text+0x4ec): undefined reference to `__intel_sse2_strdup'
namelist_gen.c:(.text+0x537): undefined reference to `__kmpc_end'
namelist_gen.c:(.text+0x579): undefined reference to `__kmpc_end'
namelist_gen.o: In function `generate_namelist':
namelist_gen.c:(.text+0x757): undefined reference to `__intel_sse2_strdup'
namelist_gen.c:(.text+0x868): undefined reference to `__intel_sse2_strdup'
namelist_gen.o: In function `get_option_value':
namelist_gen.c:(.text+0x91c): undefined reference to `__intel_sse2_strdup'
namelist_gen.c:(.text+0x94d): undefined reference to `__intel_sse2_strdup'
test_functions.o: In function `is_structure_writable':
test_functions.c:(.text+0x64): undefined reference to `__intel_sse2_strdup'
collect2: error: ld returned 1 exit status

Copy link
Contributor

@xylar xylar left a comment

Choose a reason for hiding this comment

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

I tested the compass pr suite on Chrysalis with Intel and OpenMPI using this branch, and all tests ran successfully.

@mark-petersen
Copy link
Contributor Author

I confirmed that E3SM builds are unaffected. This passes

./create_test SMS_Ld62.T62_oQU240.GMPAS-IAF.chrysalis_gnu -q acme-small --walltime 1:00:00

Copy link
Member

@darincomeau darincomeau left a comment

Choose a reason for hiding this comment

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

Passes the polaris mpas-seaice single_column test suite.

@hyungyukang
Copy link
Contributor

FYI, I was able to compile the standalone MPAS-O with gnu on Perlmutter and my Mac. Some standalone test cases were successfully terminated.

@mark-petersen
Copy link
Contributor Author

I checked LISIO, since that one tests MALI within E3SM. It passes:

./create_test SMS_D.T62_oQU120_ais20.MPAS_LISIO_TEST.chrysalis_gnu -q acme-small --walltime 30:00

@matthewhoffman
Copy link
Contributor

I successfully compiling MALI on Anvil with gnu and mvapich and without Albany. I'm getting a compass error trying to set up a fresh compass env on Perlmutter, but using an existing 1.2.0-alpha.8_pm-cpu_gnu_mpich_albany env, I am able to successfully compile MALI with Albany on Perlmutter using this branch.

@mark-petersen , @xylar , should we be worried about the MALI compile problems you are both seeing?

@mark-petersen
Copy link
Contributor Author

should we be worried about the MALI compile problems you are both seeing?

@matthewhoffman I tested commit 09491ec, which was the last commit working before stand-alone compile issues were introduced. The MALI problem existed at that point, i.e. this command on chrysalis

make ALBANY=true gfortran

fails in exactly the same way as it does with this PR. So the issue seems to be unrelated. Since you were able to compile on Anvil, and we compiled MALI on chrysalis with intel, I think we should proceed with the fixes in this PR.

Copy link
Contributor

@matthewhoffman matthewhoffman left a comment

Choose a reason for hiding this comment

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

Based on @mark-petersen's information, I'm approving this based on the MALI compilation tests that pass and that the ones that don't are a problem pre-existing this PR.

jonbob added a commit that referenced this pull request Jan 9, 2024
…#6134)

Fix MPAS standalone compile issues

These two small changes allow MPAS components to compile in stand-alone
mode. It should not affect E3SM compile or simulations. The fixes are:
* A missing endif was added to the Makefile
* A redundant corelist declaration was removed from mpas.F because it
  was added to mpas_subdriver.F in PR Introduce MOAB coupler interfaces
  and update moab driver #5979, and the subdriver is used by mpas.F.
These fixes should work for ocean, sea ice, and MALI cores.

Fixes #6133
Fixes #6138

[BFB]
@jonbob
Copy link
Contributor

jonbob commented Jan 9, 2024

Passes:

  • SMS_Ld1.ne30pg2_EC30to60E2r2.WCYCL1850.chrysalis_intel.allactive-wcprod_1850
  • ERS_Ld5.T62_oQU120.CMPASO-NYF.chrysalis_intel
  • SMS.T62_oQU120_ais20.MPAS_LISIO_TEST.chrysalis_intel

merged to next

@jonbob jonbob merged commit 7f7920b into E3SM-Project:master Jan 10, 2024
3 checks passed
@jonbob
Copy link
Contributor

jonbob commented Jan 10, 2024

merged to master

@xylar xylar deleted the mark-petersen/mpas/standalone-compile-fix branch March 15, 2024 08:15
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.

MPAS-Seaice standalone makefile is broken MPAS Stand-alone does not compile
6 participants