Skip to content

Compiling error for ifort when MPAS_ESMF="external" #1514

Description

@danrosen25

In order to support external ESMF libraries we replaced hardcoded ESMF Fortran module path linking to MPAS_ESMF_INC and hardcoded ESMF library linking to MPAS_ESMF_LIB. Since my testing only included gfortran I didn't notice that two external repositories, maintained using checkout_externals and not displayed with git status, also hardcoded path to the ESMF Fortran modules. This isn't a problem if you're using gfortran because these external repositories do not directly use ESMF Fortran modules. This is a problem for ifort because ifort checks transitive Fortran module dependencies.

I have a fix that I'm testing now and I will open PR. This fix will append the embedded/external path to ESMF inside MPAS_EXTERNAL_INCLUDES and MPAS_EXTERNAL_LIBS. These variables are later applied to LIBS and FCINCLUDES, eliminate the need to use hardcoded paths to esmf_time_f90 or a MPAS_ESMF_INC variable.

https://github.com/NCAR/MMM-physics/blob/550b5b494758ad2756394e93cb08b5709b8feb83/Makefile.mpas#L60
https://github.com/NOAA-GSL/UGWP/blob/ffb9efd8a4cccb1bc87f4972abdfa5a39a192730/Makefile#L47

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Build SystemChanges related to the build system, either `Make` or `CMake`.bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions