WRF icon indicating copy to clipboard operation
WRF copied to clipboard

Case insensitive F90 compile rule

Open MicroTed opened this issue 1 year ago • 1 comments
trafficstars

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? Yes.

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

MicroTed avatar Jun 03 '24 19:06 MicroTed