ESCOMP / CAM-SIMA

Community Atmosphere Model - System for Integrated Modeling of the Atmosphere
3 stars 11 forks source link

MUSICA linking fails on Derecho #237

Closed nusbaume closed 1 week ago

nusbaume commented 8 months ago

What happened?

Currently CAM-SIMA assumes it can link to the musica and jsonfortran libraries whenever one uses a compset other than FPHYStest. However, if then on tries to build on Derecho it fails with the following error:

/usr/bin/ld: cannot find -lmusica
/usr/bin/ld: cannot find -ljsonfortran
collect2: error: ld returned 1 exit status

which indicates that the build system is currently unable to find or link to these libraries on Derecho.

Pinging @mattldawson @K20shores @boulderdaze so that they know about this.

What are the steps to reproduce the bug?

The following steps on Derecho will reproduce the error, assuming <CAM-SIMA> is wherever the CAM-SIMA codebase is located, with externals already checked out:

<CAM-SIMA>/cime/scripts/create_newcase --case cam_sima_test --res ne5pg2_ne5pg2_mg37 --mach derecho --compset FKESSLER --compiler gnu --run-unsupported
cd cam_sima_test
./case.setup
./case.build

What CAM-SIMA hash were you using?

7d299b6

What machine were you running CAM-SIMA on?

CISL machine (e.g. cheyenne)

What compiler were you using?

GNU

Path to a case directory, if applicable

/glade/derecho/scratch/nusbaume/model_runs/SIMA_ne5pg2_FKESSLER_test

Will you be addressing this bug yourself?

No

Extra info

If anyone does run into this bug, then it can be fixed by simply running:

./xmlchange CAM_LINKED_LIBS=' '

In their case directory, and then running ./case.build again.

K20shores commented 8 months ago

Thanks for letting us know. I made an issue on our side so we can track it

mgduda commented 1 week ago

Just giving this issue a bump. It would really be nice if we didn't always have to manually ./xmlchange CAM_LINKED_LIBS=... when setting up cases.

K20shores commented 1 week ago

@nusbaume What would be your recommended fix for this? Musica would only be needed when musica chemistry is enabled. It was never the goal to have this always on but I clearly did something wrong.

nusbaume commented 1 week ago

@K20shores If I remember correctly the original idea was that we would always link to a MUSICA library even if we weren't actually using it, but I agree that it seems like it might not be worth it at the moment. @mgduda I believe you can remove this requirement by simply deleting the following line in CAM-SIMA:

https://github.com/ESCOMP/CAM-SIMA/blob/development/cime_config/config_component.xml#L311

If that change works for you then maybe we could include it in PR #280, which I assume will come in next. @peverwhee would you be able to include this change in your PR? If so then I think we can close this issue when that PR is merged. Thanks!

nusbaume commented 1 week ago

PR #280 should resolve this issue, at least for simulations that aren't running MUSICA. So I will go ahead and close this now (but feel free to re-open it if you run into it again). Thanks!