underworld2
underworld2 copied to clipboard
No package 'PETSc' found
running build_ext
==> Configuring: $ cmake -S /home/cloudam/underworld2-2.13.0b/underworld/libUnderworld -B /home/cloudam/underworld2-2.13.0b/build/temp.linux-x86_64-cpython-310_libUnderworld -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:PATH=/home/cloudam/underworld2-2.13.0b/build/lib.linux-x86_64-cpython-310/underworld -DPython3_ROOT_DIR=/home/cloudam/.conda/envs/underworld2 -DCALL_FROM_SETUP_PY:BOOL=ON
==> Building: $ cmake --build /home/cloudam/underworld2-2.13.0b/build/temp.linux-x86_64-cpython-310_libUnderworld --config Release
==> Installing: $ cmake --install /home/cloudam/underworld2-2.13.0b/build/temp.linux-x86_64-cpython-310_libUnderworld
CMake Deprecation Warning at CMakeLists.txt:5 (cmake_policy): The OLD behavior for policy CMP0078 will be removed from a future version of CMake.
The cmake-policies(7) manual explains that the OLD behaviors of all policies are deprecated and that a policy should be set to OLD only under specific short-term circumstances. Projects should be ported to the NEW behavior and not rely on setting a policy to OLD.
-- The C compiler identification is GNU 11.3.0
-- The CXX compiler identification is GNU 11.3.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /public/software/.local/easybuild/software/GCCcore/11.3.0/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /public/software/.local/easybuild/software/GCCcore/11.3.0/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.27.1")
-- Found LibXml2: /public/software/.local/easybuild/software/Anaconda3/2020.02/lib/libxml2.so (found version "2.9.12")
-- Found MPI_C: /public/software/.local/easybuild/software/impi/2021.6.0-intel-compilers-2022.1.0/mpi/2021.6.0/lib/release/libmpi.so (found version "3.1")
-- Found MPI_CXX: /public/software/.local/easybuild/software/impi/2021.6.0-intel-compilers-2022.1.0/mpi/2021.6.0/lib/libmpicxx.so (found version "3.1")
-- Found MPI: TRUE (found version "3.1")
-- Found Python3: /home/cloudam/.conda/envs/underworld2/bin/python3.10 (found version "3.10.5") found components: Interpreter Development NumPy Development.Module Development.Embed
-- Found SWIG: /home/cloudam/.conda/envs/underworld2/bin/swig (found suitable version "4.0.2", minimum required is "4.0") found components: python
-- Checking for module 'PETSc'
-- No package 'PETSc' found
CMake Error at /home/cloudam/.conda/envs/underworld2/share/cmake-3.24/Modules/FindPkgConfig.cmake:607 (message):
A required package was not found
Call Stack (most recent call first):
/home/cloudam/.conda/envs/underworld2/share/cmake-3.24/Modules/FindPkgConfig.cmake:829 (_pkg_check_modules_internal)
CMakeLists.txt:26 (pkg_check_modules)
-- Configuring incomplete, errors occurred!
See also "/home/cloudam/underworld2-2.13.0b/build/temp.linux-x86_64-cpython-310_libUnderworld/CMakeFiles/CMakeOutput.log".
Traceback (most recent call last):
File "/home/cloudam/underworld2-2.13.0b/setup.py", line 289, in
(underworld2) [cloudam@master underworld2-2.13.0b]$ module list
Currently Loaded Modules:
- Anaconda3/2020.02 3) zlib/1.2.12-GCCcore-11.3.0 5) intel-compilers/2022.1.0 7) UCX/1.12.1-GCCcore-11.3.0 9) imkl/2022.1.0 11) imkl-FFTW/2022.1.0-iimpi-2022a 13) PETSc/3.17.4-intel-2022a
- GCCcore/11.3.0 4) binutils/2.38-GCCcore-11.3.0 6) numactl/2.0.14-GCCcore-11.3.0 8) impi/2021.6.0-intel-compilers-2022.1.0 10) iimpi/2022a 12) intel/2022a
(underworld2) [cloudam@master underworld2-2.13.0b]$ module show PETSc/3.17.4-intel-2022a
/public/software/.local/easybuild/modules/all/PETSc/3.17.4-intel-2022a.lua:
help([[ Description
PETSc, pronounced PET-see (the S is silent), is a suite of data structures and routines for the scalable (parallel) solution of scientific applications modeled by partial differential equations.
More information
- Homepage: https://www.mcs.anl.gov/petsc ]]) whatis("Description: PETSc, pronounced PET-see (the S is silent), is a suite of data structures and routines for the scalable (parallel) solution of scientific applications modeled by partial differential equations.") whatis("Homepage: https://www.mcs.anl.gov/petsc") whatis("URL: https://www.mcs.anl.gov/petsc") conflict("PETSc") prepend_path("CMAKE_PREFIX_PATH","/public/software/.local/easybuild/software/PETSc/3.17.4-intel-2022a") prepend_path("CPATH","/public/software/.local/easybuild/software/PETSc/3.17.4-intel-2022a/include") prepend_path("LD_LIBRARY_PATH","/public/software/.local/easybuild/software/PETSc/3.17.4-intel-2022a/lib") prepend_path("LIBRARY_PATH","/public/software/.local/easybuild/software/PETSc/3.17.4-intel-2022a/lib") prepend_path("PATH","/public/software/.local/easybuild/software/PETSc/3.17.4-intel-2022a/lib/petsc/bin") prepend_path("PKG_CONFIG_PATH","/public/software/.local/easybuild/software/PETSc/3.17.4-intel-2022a/lib/pkgconfig") prepend_path("PYTHONPATH","/public/software/.local/easybuild/software/PETSc/3.17.4-intel-2022a/lib/petsc/bin") prepend_path("XDG_DATA_DIRS","/public/software/.local/easybuild/software/PETSc/3.17.4-intel-2022a/share") setenv("EBROOTPETSC","/public/software/.local/easybuild/software/PETSc/3.17.4-intel-2022a") setenv("EBVERSIONPETSC","3.17.4") setenv("EBDEVELPETSC","/public/software/.local/easybuild/software/PETSc/3.17.4-intel-2022a/easybuild/PETSc-3.17.4-intel-2022a-easybuild-devel") setenv("PETSC_DIR","/public/software/.local/easybuild/software/PETSc/3.17.4-intel-2022a")
(underworld2) [cloudam@master underworld2-2.13.0b]$
How to solve this problem, please let me know, thank you
Hi @hezhiqiang8909, CMAKE can't find the PETSC installation successfully, can you try another version of Petsc.
Currently for UW-2.13 we recommend using petsc/3.17.1
, I notice you have PETSc/3.17.4
Hi @hezhiqiang8909, CMAKE can't find the PETSC installation successfully, can you try another version of Petsc.
Currently for UW-2.13 we recommend using
petsc/3.17.1
, I notice you havePETSc/3.17.4
Not working with this version, what would be the reason, I have also tried the cunda way to install, all stuck in this error
cmake looks for a .pc file at $PETSC_DIR/lib/pkgconfig/PETSc.pc
Is this file on your machine at that location?
cmake looks for a .pc file at
$PETSC_DIR/lib/pkgconfig/PETSc.pc
Is this file on your machine at that location? yes
cmake looks for a .pc file at
$PETSC_DIR/lib/pkgconfig/PETSc.pc
Is this file on your machine at that location?
But, still this error, buddy
Can you send through this /home/cloudam/underworld2-2.13.0b/build/temp.linux-x86_64-cpython-310_libUnderworld/CMakeFiles/CMakeOutput.log
CMakeOutput.log Here is my log file, thank you
Can you send through this
/home/cloudam/underworld2-2.13.0b/build/temp.linux-x86_64-cpython-310_libUnderworld/CMakeFiles/CMakeOutput.log
Here is my log file, thank you
I cracked, man
Your installation document is not very detailed. It is recommended to provide a detailed installation document and steps to facilitate the installation of our HPC cluster administrators. This will be the usual practice.
Thanks for letting us know - Underworld is a community project and so our documentation always benefits from users feedback and we are open to having help when people figure out how to do something.
Thanks for the log file, unfortunately it didn't help pin point the problem.
I think something unexpected is occurring with cmake(pkg-config), easybuild and petsc.
To debug more, could you modify the file underworld/libUnderworld/CMakeList.txt
and add this line
message(STATUS "FOOBAR = $ENV{PKG_CONFIG_PATH}")
above
pkg_check_modules(PETSc REQUIRED PETSc)
Then rerun pip install
and post up the FOOBAR
line output.
Hi @hezhiqiang8909 , @julesghub, @lmoresi
Just some thoughts. PETSc
is really picky with the MPI libraries.
Assuming that PETSc is installed properly, you need to figure out why pkconfig
is not happy with the PETSc
configuration.
Could be MPI
. Not sure about EasyInstall
.
The list of module loaded is a bit weird... I see some intel compilers and GCC... Anaconda? Any reasons for that?
@hezhiqiang8909, we can't provide detailed instructions for machines we are not supporting. I don't think there are standard for the way modules are configured. As @lmoresi said, this is a community project so feel free to contribute to the documentation.
Now what is good practice is to provide us with some idea of your environment variables...
The dependency environment is installed in conda,The Intel toolchain is used to compile PETSc
Hi @hezhiqiang8909 , @julesghub, @lmoresi
Just some thoughts.
PETSc
is really picky with the MPI libraries. Assuming that PETSc is installed properly, you need to figure out whypkconfig
is not happy with thePETSc
configuration. Could beMPI
. Not sure aboutEasyInstall
.The list of module loaded is a bit weird... I see some intel compilers and GCC... Anaconda? Any reasons for that?
@hezhiqiang8909, we can't provide detailed instructions for machines we are not supporting. I don't think there are standard for the way modules are configured. As @lmoresi said, this is a community project so feel free to contribute to the documentation.
Now what is good practice is to provide us with some idea of your environment variables...
I can post my detailed steps
Hi, my steps are as follows @rbeucher @julesghub @lmoresi
wget https://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-3.17.1.tar.gz
tar -xvf petsc-3.17.1.tar.gz
mv petsc-3.17.1 3.17.1-intel-2022a
cd 3.17.1-intel-2022a/
module add intel/2022a
./configure --with-cc=mpicc --with-cxx=mpicxx --with-fc=mpiifort --download-hdf5 --download-mumps --download-scalapack --download-cmake
make PETSC_DIR=/public/software/.local/easybuild/software/PETSc/3.17.1-intel-2022a PETSC_ARCH=arch-linux-c-debug all
make PETSC_DIR=/public/software/.local/easybuild/software/PETSc/3.17.1-intel-2022a PETSC_ARCH=arch-linux-c-debug check
vim /public/software/.local/easybuild/modules/all/PETSc/3.17.1-intel-2022a.lua #This step is to set the environment variable lua script of PETSc to facilitate module loading and management
module purge #Clear all loaded template environment variables
module add Anaconda3/2020.02
module add PETSc/3.17.4-intel-2022a
wget https://github.com/underworldcode/underworld2/archive/refs/tags/v2.13.0b.tar.gz
tar -xvf v2.13.0b.tar.gz
cd underworld2-2.13.0b/
conda create -n underworld2 python=3.9.7
source activate underworld2
conda install hdf5 mpich swig libxml2 numpy cmake ninja
python setup.py build #There is an error in this step, I don't know if you can see what is wrong with my steps, thank you very much for your support
@rbeucher @lmoresi @julesghub Hello, is there any progress on this problem? Has the problem been reproduced? I will cooperate with debugging
The ultimate goal I want to achieve is to perform multi-node parallel computing on our HPC cluster. Currently, only single-machine parallelism is possible through singularity. Is there a way to achieve multi-node parallelism? Use source code to compile and install in a shared directory, and load it by means of environment variables
Why are you installing PETSc 3.17.1 and then loading the PETSc 3.17.4 module? Also, Conda environment are not a great idea on clusters... I would check what your PETSc module has installed as external modules and build Underworld from there.
The ultimate goal I want to achieve is to perform multi-node parallel computing on our HPC cluster. Currently, only single-machine parallelism is possible through singularity. Is there a way to achieve multi-node parallelism? Use source code to compile and install in a shared directory, and load it by means of environment variables
Well you need to configure singularity on your cluster to do that. This is used at the Pawsey Supercomputer center in WA. We don't provide support for this. You will have to ask help from your system administrator. Any specific reason to use Singularity?
PETSc 3.17.1
Copy error, I am loading PETSc 3.17.1
The ultimate goal I want to achieve is to perform multi-node parallel computing on our HPC cluster. Currently, only single-machine parallelism is possible through singularity. Is there a way to achieve multi-node parallelism? Use source code to compile and install in a shared directory, and load it by means of environment variables
Well you need to configure singularity on your cluster to do that. This is used at the Pawsey Supercomputer center in WA. We don't provide support for this. You will have to ask help from your system administrator. Any specific reason to use Singularity?
我想要实现的最终目标是在我们的 HPC 集群上执行多节点并行计算。目前,通过奇异性只能实现单机并行。有没有办法实现多节点并行?使用源码编译安装在共享目录下,通过环境变量加载
那么你需要在你的集群上配置奇异性来做到这一点。这是在华盛顿州的 Pawsey 超级计算机中心使用的。我们不为此提供支持。您必须向系统管理员寻求帮助。使用 Singularity 的任何具体原因?
That's all for now, thank you
@hezhiqiang8909 can you try this file:
https://github.com/underworldcode/underworld2/blob/6d8821c5287ae6cc84d541fe50265539eb2de875/underworld/libUnderworld/CMakeLists.txt
Copy it into path underworld2-2.13.0b/underworld/libUnderworld/CMakeLists.txt
I tweaked how CMAKE uses the PKG_CONFIG_PATH.
Then run pip install . -vvv
(instead of python setup.py build
) from the top level underworld2-2.13.0b/
dir.
As @rbeucher points out conda isn't recommended for HPC machines. We generally just install PETSc directly and use pip to install required python packages.
@hezhiqiang8909, did the above change to CMakeLists.txt
help?
Let me know if you need help with it?