E4S-Project / e4s

E4S for Spack
https://e4s.readthedocs.io
MIT License
30 stars 13 forks source link

[support]: heffte spack test failure #112

Closed shahzebsiddiqui closed 1 year ago

shahzebsiddiqui commented 1 year ago

Name of Software

heffte

URL for Software

No response

Contact Details

shahzebsiddiqui@lbl.gov

HPC System

Perlmutter

Request Description

 ~/ spack test run heffte
==> Spack test o7g3gczs4jici4zeshqvczkx4yenegvi
==> Testing package heffte-2.2.0-atk3gky
==> Error: ProcessError: Command exited with status 1:
    'cmake' '/global/common/software/spackecp/perlmutter/e4s-22.05/78535/spack/opt/spack/cray-sles15-zen3/gcc-11.2.0/heffte-2.2.0-atk3gky5zjx6z36dhj5goj5aeqhqhshn/share/heffte/testing'

1 error found in test log:
     6     -- Detecting CXX compiler ABI info - done
     7     -- Check for working CXX compiler: /global/common/software/spackecp/perlmutter/e4s-22.05/78535/spack/lib/spack/env/gcc/g++ - skipped
     8     -- Detecting CXX compile features
     9     -- Detecting CXX compile features - done
     10    -- heFFTe post-installation testing
     11    -- Could NOT find MPI_CXX (missing: MPI_CXX_LIB_NAMES) (found version "3.1")
  >> 12    CMake Error at /global/common/software/spackecp/perlmutter/e4s-22.05/78535/spack/opt/spack/cray-sles15-zen3/gcc-11.2.0/cmake-3.23.1-p23fzuowp4yuitemelic7f65nwybthxd/share/cmake-3.23/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
     13      Could NOT find MPI (missing: MPI_CXX_FOUND) (found version "3.1")
     14    Call Stack (most recent call first):
     15      /global/common/software/spackecp/perlmutter/e4s-22.05/78535/spack/opt/spack/cray-sles15-zen3/gcc-11.2.0/cmake-3.23.1-p23fzuowp4yuitemelic7f65nwybthxd/share/cmake-3.23/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
     16      /global/common/software/spackecp/perlmutter/e4s-22.05/78535/spack/opt/spack/cray-sles15-zen3/gcc-11.2.0/cmake-3.23.1-p23fzuowp4yuitemelic7f65nwybthxd/share/cmake-3.23/Modules/FindMPI.cmake:1830 (find_package_handle_standard_args)
     17      /global/common/software/spackecp/perlmutter/e4s-22.05/78535/spack/opt/spack/cray-sles15-zen3/gcc-11.2.0/heffte-2.2.0-atk3gky5zjx6z36dhj5goj5aeqhqhshn/lib/cmake/Heffte/HeffteConfig.cmake:108 (find_package)
     18      CMakeLists.txt:16 (find_package)

See test log for details:
  /global/homes/s/siddiq90/.spack/test/o7g3gczs4jici4zeshqvczkx4yenegvi/heffte-2.2.0-atk3gky-test-out.txt

======================== 1 failed, 0 passed of 1 specs =========================
==> Error: 1 test(s) in the suite failed.

It can't find MPI that seems bit odd we do have cray-mpich loaded according to spack but its also loaded at startup

 ~/ spack load --list
==> 20 loaded packages
-- cray-sles15-zen3 / gcc@11.2.0 --------------------------------
bzip2@1.0.6   cray-mpich@8.1.22  expat@2.4.8  heffte@2.2.0      libbsd@0.11.5  libmd@1.0.4   lz4@1.9.3  mbedtls@2.28.0  rhash@1.4.2  zlib@1.2.12
cmake@3.23.1  curl@7.66.0        fftw@3.3.10  libarchive@3.5.2  libiconv@1.16  libuv@1.44.1  lzo@2.10   ncurses@6.1     xz@5.2.5     zstd@1.5.2
 ~/ ml

Currently Loaded Modules:
  1) craype-x86-milan     3) craype-network-ofi                      5) PrgEnv-gnu/8.3.3   7) cray-libsci/22.11.1.2   9) craype/2.7.19  11) perftools-base/22.09.0  13) xalt/2.10.2              15) Nsight-Systems/2022.2.1  17) craype-accel-nvidia80  19) e4s/22.05
  2) libfabric/1.15.2.0   4) xpmem/2.5.2-2.4_3.20__gd0f7936.shasta   6) cray-dsmml/0.2.2   8) cray-mpich/8.1.22      10) gcc/11.2.0     12) cpe/22.11               14) Nsight-Compute/2022.1.1  16) cudatoolkit/11.7         18) gpu/1.0

The cray wrappers including the mpicc is available

 ~/ which mpicc
/opt/cray/pe/mpich/8.1.22/ofi/gnu/9.1/bin/mpicc

According to the test it looks like its trying to run a cmake, make.

    def test(self):
        # using the tests installed in <prefix>/share/heffte/testing
        cmake_dir = join_path(self.prefix, 'share', 'heffte', 'testing')
        test_dir = join_path(self.test_suite.current_test_cache_dir,
                             'test_install')
        with working_dir(test_dir, create=True):
            cmake(cmake_dir)
            make()
            make('test')

There is a CMakelists.txt but i am not really sure what this test is doing but there seems to be examples in the production directory

 ~/ cat $(spack location -i heffte)/share/heffte/testing/CMakeLists.txt
cmake_minimum_required(VERSION 3.23)
cmake_policy(VERSION 3.23)
project(HeffteTesting VERSION 2.2.0 LANGUAGES CXX)
enable_testing()

message(STATUS "heFFTe post-installation testing")

macro(heffte_add_mpi_test)
    cmake_parse_arguments(_heffte "" "NAME;COMMAND;RANKS" "" ${ARGN} )
    add_test(${_heffte_NAME} ${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} ${_heffte_RANKS} ${MPIEXEC_PREFLAGS} ${CMAKE_CURRENT_BINARY_DIR}/${_heffte_COMMAND} ${MPIEXEC_POSTFLAGS})
    unset(_heffte_NAME)
    unset(_heffte_RANKS)
    unset(_heffte_COMMAND)
endmacro()

find_package(Heffte 2.2.0 REQUIRED)

add_subdirectory("/global/common/software/spackecp/perlmutter/e4s-22.05/78535/spack/opt/spack/cray-sles15-zen3/gcc-11.2.0/heffte-2.2.0-atk3gky5zjx6z36dhj5goj5aeqhqhshn/share/heffte/examples" examples)

if (Heffte_FFTW_FOUND)
    heffte_add_mpi_test(NAME example_fftw     COMMAND  examples/heffte_example_fftw     RANKS 2)
    heffte_add_mpi_test(NAME example_options  COMMAND  examples/heffte_example_options  RANKS 2)
    heffte_add_mpi_test(NAME example_vectors  COMMAND  examples/heffte_example_vectors  RANKS 2)
    heffte_add_mpi_test(NAME example_r2c      COMMAND  examples/heffte_example_r2c      RANKS 2)
endif()

heffte_add_mpi_test(NAME example_r2r      COMMAND  examples/heffte_example_r2r      RANKS 4)

if (Heffte_CUDA_FOUND)
    heffte_add_mpi_test(NAME example_cuda     COMMAND  examples/heffte_example_cuda     RANKS 2)
endif()

if (Heffte_ONEAPI_FOUND)
    heffte_add_mpi_test(NAME example_sycl     COMMAND  examples/heffte_example_sycl     RANKS 4)
endif()

if (Heffte_FFTW_FOUND AND CMAKE_C_COMPILER)
    heffte_add_mpi_test(NAME example_c        COMMAND  examples/heffte_example_c        RANKS 2)
endif()

if (Heffte_FFTW_FOUND AND Heffte_Fortran_FOUND)
    heffte_add_mpi_test(NAME example_fortran  COMMAND  examples/heffte_example_fortran  RANKS 2)
endif()

examples directory

 ~/ ls -l $(spack location -i heffte)/share/heffte/examples
total 44
-rw-r--r-- 1 e4s spackecp 1656 Jan 11 10:43 CMakeLists.txt
-rw-r--r-- 1 e4s spackecp 2814 Jan 11 10:43 heffte_example_c.c
-rw-r--r-- 1 e4s spackecp 3807 Jan 11 10:43 heffte_example_cuda.cpp
-rw-r--r-- 1 e4s spackecp 5127 Jan 11 10:43 heffte_example_fftw.cpp
-rw-r--r-- 1 e4s spackecp 2962 Jan 11 10:43 heffte_example_fftw.f90
-rw-r--r-- 1 e4s spackecp 4784 Jan 11 10:43 heffte_example_options.cpp
-rw-r--r-- 1 e4s spackecp 4139 Jan 11 10:43 heffte_example_r2c.cpp
-rw-r--r-- 1 e4s spackecp 3037 Jan 11 10:43 heffte_example_r2r.cpp
-rw-r--r-- 1 e4s spackecp 3394 Jan 11 10:43 heffte_example_sycl.cpp
-rw-r--r-- 1 e4s spackecp 4046 Jan 11 10:43 heffte_example_vectors.cpp

Relevant log output

No response

Reproduce Bug

1. `ml e4s/22.05`
2. `spack env activate -V gcc`
3. `spack load heffte`
4. `spack test run heffte`
eugeneswalker commented 1 year ago

What do you think @wspear? Do you think this is because the MPI is being loaded into the spack test run environment?

wspear commented 1 year ago

Support for spack test issues should be handled on the spack repository tracker. The relevant issue is here: https://github.com/spack/spack/issues/35265