Re: [Ecp-aurora-sdk-discuss] CMake detection of OpenMP on Iris
Hi Elliot, Following is an example how you can check the ability of cmake to find OpenMP components. 1) Open an interactive session on Iris node qsub -I -n 1 -t 60 -q iris 2) Load required modules: export MODULEPATH=/soft/restricted/CNDA/modulefiles module load oneapi module load cmake 3) Create CMakeLists.txt with the following content: cmake_minimum_required(VERSION 3.17) project (Test C CXX Fortran) find_package(OpenMP REQUIRED) 4) Run the script mkdir build; cd build cmake .. Following is what I get: -- The C compiler identification is Clang 12.0.0 -- The CXX compiler identification is Clang 12.0.0 -- The Fortran compiler identification is Intel 2019.0.0.20200827 -- Check for working C compiler: /soft/restricted/CNDA/modulefiles/oneapi/bin/icx -- Check for working C compiler: /soft/restricted/CNDA/modulefiles/oneapi/bin/icx - works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /soft/restricted/CNDA/modulefiles/oneapi/bin/icpx -- Check for working CXX compiler: /soft/restricted/CNDA/modulefiles/oneapi/bin/icpx - works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Check for working Fortran compiler: /soft/restricted/CNDA/modulefiles/oneapi/bin/ifx -- Check for working Fortran compiler: /soft/restricted/CNDA/modulefiles/oneapi/bin/ifx - works -- Detecting Fortran compiler ABI info -- Detecting Fortran compiler ABI info - done -- Checking whether /soft/restricted/CNDA/modulefiles/oneapi/bin/ifx supports Fortran 90 -- Checking whether /soft/restricted/CNDA/modulefiles/oneapi/bin/ifx supports Fortran 90 - yes -- Found OpenMP_C: -fopenmp=libiomp5 (found version "5.0") -- Found OpenMP_CXX: -fopenmp=libiomp5 (found version "5.0") -- Found OpenMP_Fortran: -qopenmp (found version "5.0") -- Found OpenMP: TRUE (found version "5.0") -- Configuring done -- Generating done -- Build files have been written to: /home/vanisimov/cmake/test_openmp/build This shows that OpenMP is properly found. In your case, check CC, CXX, and FC values that you supply to cmake. Thank you, Victor -- Victor Anisimov, PhD Application Performance Engineer Argonne Leadership Computing Facility 9700 S. Cass Ave, Bldg 240, Room 1121 Lemont, IL 60439
On Sep 28, 2020, at 4:42 PM, Slaughter, Elliott David via Ecp-aurora-sdk-discuss <[email protected]> wrote:
Hi,
Is there any trick to getting CMake to detect OpenMP on Iris? I'm getting the following:
CMake Error at /soft/packaging/spack-builds/linux-rhel7-x86_64/gcc-9.3.0/cmake-3.17.0-5dgh2gvtfsxrvwqkw3m7jq2jhhk6yhph/share/cmake-3.17/Modules/FindPackageHandleStandardArgs.cmake:164 (message): Could NOT find OpenMP_C (missing: OpenMP_C_FLAGS OpenMP_C_LIB_NAMES)
The available advice online seems to indicate it can be caused by OpenMP missing. But I've done module load oneapi in my environment, so I'm confused why it can't find it.
Thanks.
-- Ecp-aurora-sdk-discuss mailing list [email protected] https://lists.jlse.anl.gov/mailman/listinfo/ecp-aurora-sdk-discuss
participants (1)
-
Anisimov, Victor