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

ELM cmake configuration cannot find load files in FindPETSc.cmake, when 'CLM_USE_PETSC' is TRUE #3316

Closed
fmyuan opened this issue Nov 15, 2019 · 7 comments · Fixed by #3326
Closed
Assignees

Comments

@fmyuan
Copy link
Contributor

fmyuan commented Nov 15, 2019

After ELM build switches from make to cmake, when 'CLM_USE_PETSC' is TRUE, the cmake configuration cannot successfully find PETSc package. The error message is like:

........
-- Configuring incomplete, errors occurred! 
See also "...../bld/lnd/obj/CMakeFiles/CMakeOutput.log".
CMake Error at ...../cime/src/CMake/FindPETSc.cmake:124 (include):
  include could not find load file:
    FindPackageMultipass
Call Stack (most recent call first):
  CMakeLists.txt:229 (find_package)
CMake Error at ....../cime/src/CMake/FindPETSc.cmake:125 (find_package_multipass):
  Unknown CMake command "find_package_multipass".
Call Stack (most recent call first):
  CMakeLists.txt:229 (find_package)
ERROR: CMake Error at ....../cime/src/CMake/FindPETSc.cmake:124 (include):
  include could not find load file:
    FindPackageMultipass
Call Stack (most recent call first):
  CMakeLists.txt:229 (find_package)
CMake Error at /Users/f9y/mygithub/ACME/cime/src/CMake/FindPETSc.cmake:125 (find_package_multipass):
  Unknown CMake command "find_package_multipass".
Call Stack (most recent call first):
  CMakeLists.txt:229 (find_package)

I think it's because the cmake module files for PETsc package were not ALL copied from Jed Brown's (see: https://github.com/jedbrown/cmake-modules). And some minor edits in cime/src/CMake/FindPETSc.cmake are also needed. So fixes, tested on ORNL CADES, may be like in branch:

fmyuan/lnd/elm-pflotran
commit: 56557334afd8474e68c7b7289e018b2d42dd9b7d

@bishtgautam
Copy link
Contributor

@jqyin Since I don't have access to ORNL CADES, can this be assigned to you?

@rljacob
Copy link
Member

rljacob commented Nov 15, 2019

Do you have to be on ORNL CADES to reproduce the problem? We don't officially support that platform.

@fmyuan
Copy link
Contributor Author

fmyuan commented Nov 15, 2019

@rljacob No. I think that, for whatever reason to use PETSc libraries available in any platform, it's not going to work with cmake.

@rljacob
Copy link
Member

rljacob commented Nov 15, 2019

Please share the create_newcase command and other steps to reproduce the problem.

@fmyuan
Copy link
Contributor Author

fmyuan commented Nov 15, 2019

@rljacob

  1. should be no specific options for create_new_case.
  2. After create_new_case, ./case.setup may have issue not find 'PETSC_PATH', which upon platform's environmetal variables.
  3. After ./case.setup, modify 'env_build.xml' for 'CLM_USE_PETSC' or 'USE_PETSC' to 'TRUE'
  4. ./case.build then should stop when building CLM, due to this bug.

@rljacob
Copy link
Member

rljacob commented Nov 15, 2019

  1. Maybe not but what case are you trying to build?

@fmyuan
Copy link
Contributor Author

fmyuan commented Nov 15, 2019

I'm trying to use PETSc library for coupling PFLOTRAN to ELM. There was no specific create_new_case option for this.
The real issue is that E3SM Makefile will try to include and to link PETSc headers and libs, when 'USE_PETSC' set to TRUE. Those will be provided by cmake configuration via ./component/CMakelist.txt, which actually calls module files in ./cime/src/CMake/. For PETSc package in that folder, only findPETSc.cmake exists while other files from Jed Brown's not.

rljacob pushed a commit that referenced this issue Apr 21, 2021
In #3257, the namelist_definition_drv.xml also needed to be updated. Change sst_aquap11 to sst_aquap_constant.

Test suite:
Test baseline:
Test namelist changes: Tested using QPRCEMIP compset
Test status: [bit for bit, roundoff, climate changing]

Fixes [CIME Github issue #] none (issue was opened in ESCOMP/CAM as issue 39, but discovered the error was in cime)

User interface changes?:

Update gh-pages html (Y/N)?:

Code review:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants