ESMCI / cime

Common Infrastructure for Modeling the Earth
http://esmci.github.io/cime
Other
162 stars 209 forks source link

--xml-test-list not working? #4641

Open samsrabin opened 5 months ago

samsrabin commented 5 months ago

From a checkout of ctsm5.2.005, I'm unable to use --xml-test-list. Here's the command I was running from the CTSM src/ dir:

../cime/scripts/fortran_unit_testing/run_tests.py --build-dir unit_tests.temp --xml-test-list test_list.xml

Here are the contents of test_list.xml (based on the example file from the CIME repo):

<test_suite_list>
  <suite name="TestSubset">
    <directory relative_to="here" label="bgc">
      biogeochem/test
    </directory>
  </suite>
</test_suite_list>

And here's the result of the command, with various warnings but one error:

Compiler is intel
/glade/u/home/samrabin/ctsm_scale-mat-reqs-pr2-ggcmiseas/src/unit_tests.temp/env_mach_specific.xml already exists, delete to replace
Using PFUNIT_PATH: /glade/campaign/cesm/cesmdata/tools/pFUnit/pFUnit4.8.0_derecho_Intel2023.2.1_noMPI_noOpenMP
==================================================
Running cmake for TestSubset/bgc.
==================================================
ERROR: Command: 'cmake -C Macros.cmake /glade/u/home/samrabin/ctsm_scale-mat-reqs-pr2-ggcmiseas/src/biogeochem/test -DCIMEROOT=/glade/u/home/samrabin/ctsm_scale-mat-reqs-pr2-ggcmiseas/cime/scripts/fortran_unit_testing/../.. -DSRC_ROOT=/glade/u/home/samrabin/ctsm_scale-mat-reqs-pr2-ggcmiseas -DCIME_CMAKE_MODULE_DIRECTORY=/glade/u/home/samrabin/ctsm_scale-mat-reqs-pr2-ggcmiseas/cime/CIME/non_py/src/CMake -DCMAKE_BUILD_TYPE=CESM_DEBUG -DCMAKE_PREFIX_PATH=/glade/campaign/cesm/cesmdata/tools/pFUnit/pFUnit4.8.0_derecho_Intel2023.2.1_noMPI_noOpenMP -DUSE_MPI_SERIAL=ON -DENABLE_GENF90=ON -DCMAKE_PROGRAM_PATH=/glade/u/home/samrabin/ctsm_scale-mat-reqs-pr2-ggcmiseas/cime/scripts/fortran_unit_testing/../../CIME/non_py/externals/genf90 -DOS=CNL -DMACH=derecho -DCOMPILER=intel -DDEBUG=TRUE -DMPILIB=mpi-serial -Dcompile_threaded=FALSE -DCASEROOT=/glade/u/home/samrabin/ctsm_scale-mat-reqs-pr2-ggcmiseas/src/unit_tests.temp' failed with error 'loading initial cache file Macros.cmake
No macro file found: /cmake_macros/universal.cmake
No macro file found: /cmake_macros/.cmake
No macro file found: /cmake_macros/.cmake
No macro file found: /cmake_macros/.cmake
No macro file found: /cmake_macros/_.cmake
No macro file found: /cmake_macros/_.cmake
CMake Warning (dev) in CMakeLists.txt:
  No project() command is present.  The top-level CMakeLists.txt file must
  contain a literal, direct call to the project() command.  Add a line of
  code such as

    project(ProjectName)

  near the top of the file, but after cmake_minimum_required().

  CMake is pretending there is a "project(Project)" command on the first
  line.
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) in CMakeLists.txt:
  cmake_minimum_required() should be called prior to this top-level project()
  call.  Please see the cmake-commands(7) manual for usage documentation of
  both commands.
This warning is for project developers.  Use -Wno-dev to suppress it.

-- The C compiler identification is IntelLLVM 2023.2.0
-- The CXX compiler identification is IntelLLVM 2023.2.0
-- Cray Programming Environment 2.7.23 C
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /glade/u/apps/derecho/23.09/spack/opt/spack/ncarcompilers/1.0.0/oneapi/2023.2.1/6q5s/bin/icx - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Cray Programming Environment 2.7.23 CXX
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /glade/u/apps/derecho/23.09/spack/opt/spack/ncarcompilers/1.0.0/oneapi/2023.2.1/6q5s/bin/icpx - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at Species_test/CMakeLists.txt:5 (add_pfunit_ctest):
  Unknown CMake command "add_pfunit_ctest".

CMake Warning (dev) in CMakeLists.txt:
  No cmake_minimum_required command is present.  A line of code such as

    cmake_minimum_required(VERSION 3.26)

  should be added at the top of the file.  The version specified may be lower
  if you wish to support older CMake versions for this project.  For more
  information run "cmake --help-policy CMP0000".
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Configuring incomplete, errors occurred!' from dir '/glade/u/home/samrabin/ctsm_scale-mat-reqs-pr2-ggcmiseas/src/unit_tests.temp/TestSubset/bgc'

I would have thought it'd get add_pfunit_ctest etc. from src/CMakeLists.txt—is it not?

adrifoster commented 4 months ago

@ekluzek and I discussed re-factoring this run_tests.py script. I can work on that. Hopefully my updates will fix this problem.

github-actions[bot] commented 1 month ago

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 5 days.

samsrabin commented 1 month ago

This still happens as of ctsm5.3.002 (cime6.0.246).