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

Fix HOMME build issues with SCORPIO 1.6.3 #6429

Merged
merged 3 commits into from
Jun 3, 2024

Conversation

jayeshkrishna
Copy link
Contributor

Fixes standalone HOMME build issues with SCORPIO 1.6.3
(Also see PR #6329)

[BFB]

Removing reference to piolib_mod module since its no longer
available. Using the function directly from pio module instead.
SCORPIO no longer exports build directory with the library
targets. Adding path to SCORPIO include directory for HOMME
standalone builds
@jayeshkrishna jayeshkrishna added BFB PR leaves answers BFB HOMME standalone issues with the standalone HOMME code that dont impact E3SM SCORPIO The E3SM I/O library (derived from PIO) labels May 17, 2024
@jayeshkrishna jayeshkrishna requested a review from mt5555 May 17, 2024 14:32
@jayeshkrishna
Copy link
Contributor Author

This PR fixes build issues seen in the nightlies with HOMME_P24.f19_g16_rx1.A (standalone HOMME tests)

Copy link

github-actions bot commented May 17, 2024

PR Preview Action v1.4.7
🚀 Deployed preview to https://E3SM-Project.github.io/E3SM/pr-preview/pr-6429/
on branch gh-pages at 2024-06-01 00:24 UTC

@whannah1
Copy link
Contributor

I just tested a merge of this branch with current master on chrysalis and got this configuration error trying to build homme_tool:

-- Could NOT find PnetCDF_C (missing: PnetCDF_C_LIBRARY PnetCDF_C_INCLUDE_DIR)
-- Could not find PnetCDF library, disabling support for PnetCDF
-- Disabling support for ADIOS (default)
-- Disabling support for HDF5
-- Checking whether Fortran type INTEGER(KIND=MPI_OFFSET_KIND) has the same size as INTEGER(KIND=C_LONG_LONG)
-- Checking whether Fortran type INTEGER(KIND=MPI_OFFSET_KIND) has the same size as INTEGER(KIND=C_LONG)
-- Checking whether Fortran type INTEGER(KIND=MPI_OFFSET_KIND) has the same size as INTEGER(KIND=C_INT)
CMake Error at utils/externals/scorpio/cmake/SPIOTypeUtils.cmake:172 (message):
  Could not find a Fortran type for passing PIO Offsets from Fortran to C
Call Stack (most recent call first):
  utils/externals/scorpio/src/clib/CMakeLists.txt:183 (get_pio_offset_type)
  
  -- Configuring incomplete, errors occurred!

Here's the commands I used:

e3sm_root=/lcrc/group/e3sm/ac.whannah/scratch/chrys/tmp_clone

cd ${e3sm_root}/components/homme
eval $(${e3sm_root}/cime/CIME/Tools/get_case_env)

mach_file=${e3sm_root}/components/homme/cmake/machineFiles/chrysalis.cmake

cmake -C ${mach_file} \
-DBUILD_HOMME_WITHOUT_PIOLIBRARY=FALSE \
-DHOMME_ENABLE_COMPOSE=FALSE \
-DHOMME_BUILD_EXECS=FALSE \
-DBUILD_HOMME_TOOL=TRUE \
${e3sm_root}/components/homme

@jayeshkrishna
Copy link
Contributor Author

jayeshkrishna commented May 17, 2024

@whannah1 : Do you have the right environment set for building HOMME on Chrysalis (https://acme-climate.atlassian.net/wiki/spaces/DOC/pages/2735079654/Standalone+HOMME) ? Looks like Fortran compiler issues (not available etc).

Can you also try a simple cmake with no extra config flags (cmake -C $mach_file ${e3sm_root}/components/homme)?

@whannah1
Copy link
Contributor

I don't have a special env set other than what I get from eval $(${e3sm_root}/cime/CIME/Tools/get_case_env)

I tried the simpler cmake -C ${mach_file} ${e3sm_root}/components/homme and got the same result

@whannah1
Copy link
Contributor

After retrying with a fresh clone of this branch I can't reproduce the configuration error on chrysalis, so I think it's good aside from the perlmutter linker error I made an issue about here: E3SM-Project/scorpio#586

skyler-ruiter pushed a commit to skyler-ruiter/E3SM that referenced this pull request May 29, 2024
@jayeshkrishna
Copy link
Contributor Author

@oksanaguba / @mt5555 : This PR should be ready to merge to next, please go ahead and merge the changes when next is open.

@rljacob rljacob assigned rljacob and unassigned mt5555 and oksanaguba May 30, 2024
rljacob added a commit that referenced this pull request May 30, 2024
…next (PR #6429)

Fixes standalone HOMME build issues with SCORPIO 1.6.3

[BFB]
@rljacob
Copy link
Member

rljacob commented May 31, 2024

homme_integration suites now has one of its test passing (HOMME_P24.f19_g16_rx1.A) but the other has a build fail:

2024-05-30 22:51:50: MODEL_BUILD FAILED for test 'HOMMEBFB_P24.f19_g16_rx1.A.chrysalis_intel'.
Command: ./case.build --model-only
Output: WARNING: Found difference in test STOP_N: case: 11 original value 5
Building test for HOMMEBFB in directory /lcrc/group/e3sm2/e3smtest/scratch/chrys/J/HOMMEBFB_P24.f19_g16_rx1.A.chrysalis_intel.C.JNextHomme_integration20240530_224749
ERROR: Command: 'gmake -j8 VERBOSE=1 test-execs' failed with error 'See /lcrc/group/e3sm2/e3smtest/scratch/chrys/HOMMEBFB_P24.f19_g16_rx1.A.chrysalis_intel.C.JNextHomme_integration20240530_224749/bld/homme.bldlog' from dir '/lcrc/group/e3sm2/e3smtest/scratch/chrys/HOMMEBFB_P24.f19_g16_rx1.A.chrysalis_intel.C.JNextHomme_integration20240530_224749/bld'

Adding path to the timing binary directory to the set of include
directories. This change is required for these tests that need
path to the fortran perf mod.

This fixes build issues with the HOMMEBFB test suite using the
latest version of the SCORPIO library (new versions of the SCORPIO
library no longer export internal SCORPIO build paths with the
SCORPIO library targets)
@jayeshkrishna jayeshkrishna requested a review from oksanaguba June 1, 2024 00:23
@oksanaguba
Copy link
Contributor

why is not-cime build working without these changes?

@oksanaguba
Copy link
Contributor

... and also how did scorpio changes affect timing lib?

rljacob added a commit that referenced this pull request Jun 1, 2024
…#6429)

second merge of this branch.  Fix build issue with timing library.
@jayeshkrishna
Copy link
Contributor Author

SCORPIO used to export all of its internal build dirs with its lib targets (piof/pioc). We now only export the install paths (and dependencies). With older version of SCORPIO the HOMME builds must have been using perf/timing mods from SCORPIO (instead of the timing mods/libs in HOMME).
Also, the failing tests (builds) are only built for HOMMEBFB_* test suite (these tests are not built for the HOMME_* suite)

@oksanaguba
Copy link
Contributor

thanks, @jayeshkrishna -- i was puzzled why of all homme ut tests in that folder only remap_ut fails to build, but it seems that the other tests do not use source files with timers.

@oksanaguba
Copy link
Contributor

Separately, do you know if these warnings when configuring homme tests are an issue?

CMake Warning (dev) at /gpfs/fs1/soft/chrysalis/spack/opt/spack/linux-centos8-x86_64/intel-20.0.4/cmake-3.24.3-jii6uyz/share/cmake-3.24/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
  The package name passed to `find_package_handle_standard_args` (NetCDF_C)
  does not match the name of the calling package (NetCDF).  This can lead to
  problems in calling code that expects `find_package` result variables
  (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  utils/externals/scorpio/cmake/LibFind.cmake:302 (find_package_handle_standard_args)
  utils/externals/scorpio/cmake/FindNetCDF.cmake:51 (find_package_component)
  utils/externals/scorpio/src/clib/CMakeLists.txt:64 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

and

CMake Warning (dev) at /gpfs/fs1/soft/chrysalis/spack/opt/spack/linux-centos8-x86_64/intel-20.0.4/cmake-3.24.3-jii6uyz/share/cmake-3.24/Modules/CheckIncludeFile.cmake:82 (message):
  Policy CMP0075 is not set: Include file check macros honor
  CMAKE_REQUIRED_LIBRARIES.  Run "cmake --help-policy CMP0075" for policy
  details.  Use the cmake_policy command to set the policy and suppress this
  warning.

  CMAKE_REQUIRED_LIBRARIES is set to:

    /gpfs/fs1/soft/chrysalis/spack/opt/spack/linux-centos8-x86_64/intel-20.0.4/netcdf-c-4.4.1-qvxyzq2/lib/libnetcdf.so

  For compatibility with CMake 3.11 and below this check is ignoring it.
Call Stack (most recent call first):
  /gpfs/fs1/soft/chrysalis/spack/opt/spack/linux-centos8-x86_64/intel-20.0.4/cmake-3.24.3-jii6uyz/share/cmake-3.24/Modules/CheckTypeSize.cmake:256 (check_include_file)
  utils/externals/scorpio/cmake/SPIOTypeUtils.cmake:137 (check_type_size)
  utils/externals/scorpio/src/clib/CMakeLists.txt:183 (get_pio_offset_type)
This warning is for project developers.  Use -Wno-dev to suppress it.

and

CMake Warning (dev) at /gpfs/fs1/soft/chrysalis/spack/opt/spack/linux-centos8-x86_64/intel-20.0.4/cmake-3.24.3-jii6uyz/share/cmake-3.24/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
  The package name passed to `find_package_handle_standard_args`
  (NetCDF_Fortran) does not match the name of the calling package (NetCDF).
  This can lead to problems in calling code that expects `find_package`
  result variables (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  utils/externals/scorpio/cmake/LibFind.cmake:302 (find_package_handle_standard_args)
  utils/externals/scorpio/cmake/FindNetCDF.cmake:51 (find_package_component)
  utils/externals/scorpio/src/flib/CMakeLists.txt:228 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

@jayeshkrishna
Copy link
Contributor Author

@oksanaguba : These CMake warnings should be ok for now (low priority) and will be fixed in future release of SCORPIO.

@rljacob rljacob merged commit 01e3cd9 into master Jun 3, 2024
13 checks passed
@rljacob rljacob deleted the jayeshkrishna/homme/port_to_scorpio_1.6.2 branch June 3, 2024 21:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BFB PR leaves answers BFB HOMME standalone issues with the standalone HOMME code that dont impact E3SM SCORPIO The E3SM I/O library (derived from PIO)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants