wrf-model / WRF

The official repository for the Weather Research and Forecasting (WRF) model
Other
1.18k stars 658 forks source link

Case insensitive F90 compile rule #2057

Open MicroTed opened 1 month ago

MicroTed commented 1 month ago

The .F90 source files in physics_mmm need to be compiled directly to .o on case-insensitive file systems (like MacOS standard FS). This PR avoids the creation of a .f90 temporary, which will clobber the .F90 version.

TYPE: [bug fix]

KEYWORDS: case-insensitive filesystem

SOURCE: "Ted Mansell (NOAA/NSSL)"

DESCRIPTION OF CHANGES: Problem:

  1. On case-insensitive file systems (like MacOS standard FS), the creation of .f90 temporary files from .F90 source will clobber the source files.
  2. The configure.defaults has an unrecognized option for Apple clang

Solution:

  1. In postamble: Removed the .F90.f90 rule and compacted the .F90.o rule to use only the fortran compiler to do any necessary preprocessing. It is convention among fortran compilers that .F90 will be preprocessed.
  2. In configure.defaults: For Darwin compile with ifort+clang, removed the -qopenmp from OMPCC (Apple clang does not support OpenMP)

ISSUE: Addresses .F90.f90 issue raised in https://github.com/wrf-model/WRF/pull/1989

LIST OF MODIFIED FILES: arch/postamble arch/configure.defaults

TESTS CONDUCTED:

  1. Compiles correctly on MacOS (Intel CPU with ifort + clang) and Linux
  2. Are the Jenkins tests all passing?

RELEASE NOTE: Fixed a compile problem with .F90 source files on case-insensitive file systems.

weiwangncar commented 1 month ago

The regression test results:

Test Type              | Expected  | Received |  Failed
= = = = = = = = = = = = = = = = = = = = = = = =  = = = =
Number of Tests        : 23           24
Number of Builds       : 60           57
Number of Simulations  : 158           150        0
Number of Comparisons  : 95           86        0

Failed Simulations are: 
None
Which comparisons are not bit-for-bit: 
None