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

CMAQ will not work on macOS #169

Closed
climbfuji opened this issue Apr 12, 2022 · 7 comments
Closed

CMAQ will not work on macOS #169

climbfuji opened this issue Apr 12, 2022 · 7 comments

Comments

@climbfuji
Copy link

Description
The existence of the following files permits building or even doing any git work on macOS:

UTIL/create_ebi/src_RXNSU/junit.f
UTIL/create_ebi/src_RXNSU/junit.F
UTIL/inline_phot_preproc/src/CSQY_DATA.f
UTIL/inline_phot_preproc/src/CSQY_DATA.F

It also breaks any build system that attempts to automatically update branches from the authoritative repositories, because there are always changes to these files that result in unresolvable conflicts. This is because macOS uses a pseudo case-sensitive filesystem and doesn't recognize that UTIL/create_ebi/src_RXNSU/junit.f and UTIL/create_ebi/src_RXNSU/junit.F are different files.

If the .f versions of the two files above are preprocessed from the .F files and were mistakenly added to the repository, then these should be removed.

Scope and Impact
See above

Solution
Remove the two .f files and do preprocessing on the fly (if a two-step approach = preprocessing+compiling is preferred, then the preprocessor must write to .tmp.f instead of .f, or another problem will be created).

@climbfuji
Copy link
Author

@junwang-noaa @DusanJovic-NOAA @BrianCurtis-NOAA This will cause problems with the ufs-weather-model (it actually causes problems already if the ufs-weather-model is included in a bigger build system, for example as external package).

@bhutzell
Copy link
Contributor

Please try the below two solutions.

For UTIL/create_ebi, I agree:

  1. Removing the UTIL/create_ebi/src/junit.f is fine and preferable because the Makefile does not require changes.
    Note that creating junit.o does not require FORTRAN preprocessing.

For UTIL/ inline_phot_preproc, try

  1. Deleting UTIL/inline_phot_preproc/src/CSQY_DATA.F, UTIL/inline_phot_preproc/src/CSQY_DATA.f, UTIL/inline_phot_preproc/src/CSQY_DATA_gen.f and UTIL/inline_phot_preproc/src/CSQY_DATA_old.f
    Why? Building this utility does not use the source code files.

@climbfuji
Copy link
Author

Please try the below two solutions.

For UTIL/create_ebi, I agree:

  1. Removing the UTIL/create_ebi/src/junit.f is fine and preferable because the Makefile does not require changes.
    Note that creating junit.o does not require FORTRAN preprocessing.

For UTIL/ inline_phot_preproc, try

  1. Deleting UTIL/inline_phot_preproc/src/CSQY_DATA.F, UTIL/inline_phot_preproc/src/CSQY_DATA.f, UTIL/inline_phot_preproc/src/CSQY_DATA_gen.f and UTIL/inline_phot_preproc/src/CSQY_DATA_old.f
    Why? Building this utility does not use the source code files.

@bhutzell Thanks for the pointers, is this mean to be a solution that can be merged back into the repository?

I can always work around on my local machine, but the system has to work out of the box. For instance, after a recursive clone of the ufs-weather-model (where CMAQ is a nested submodule of), the user has to be able to compile the code without any manual intervention.

@kmfoley
Copy link
Collaborator

kmfoley commented Apr 20, 2022

@climbfuji We are working to get this update merged into our v5.3.3+ branch. I will let you know when it is merged and ready to be used. The update will also be included in our next release, v5.4, this fall.

@climbfuji
Copy link
Author

climbfuji commented Apr 20, 2022 via email

@kmfoley
Copy link
Collaborator

kmfoley commented May 7, 2022

This issue is now resolved in the code on the v5.3.3+ branch. Tag: CMAQv5.3.3.2_7May2022

@kmfoley kmfoley closed this as completed May 7, 2022
@climbfuji
Copy link
Author

Thanks very much, @kmfoley !

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

No branches or pull requests

3 participants