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

Install with STRUMPACK fails #80

Open
benzwick opened this issue May 20, 2021 · 3 comments
Open

Install with STRUMPACK fails #80

benzwick opened this issue May 20, 2021 · 3 comments
Labels

Comments

@benzwick
Copy link
Member

Attempting to install PyMFEM with option --with-strumpack as follows:

python3 setup.py install --with-parallel --with-strumpack --user

fails with the following error:

Moving to a directory : /home/ben/projects/mfem/PyMFEM/external/mfem/cmbuild_par
calling ... cmake .. -DCMAKE_VERBOSE_MAKEFILE=1 -DBUILD_SHARED_LIBS=1 -DMFEM_ENABLE_EXAMPLES=1 -DMFEM_ENABLE_MINIAPPS=1 -DCMAKE_SHARED_LINKER_FLAGS=-L/home/ben/.local/mfem/lib -L/home/ben/.local/mfem/lib -DMFEM_USE_ZLIB=1 -DCMAKE_CXX_FLAGS=-std=c++11 -DCMAKE_CXX_COMPILER=mpic++ -DMFEM_USE_EXCEPTIONS=0 -DCMAKE_INSTALL_PREFIX=/home/ben/.local/mfem/par -DMFEM_USE_MPI=1 -DMFEM_USE_METIS_5=1 -DHYPRE_DIR=/home/ben/.local/mfem -DMETIS_DIR=/home/ben/.local/mfem -DMFEM_USE_STRUMPACK=1 -STRUMPACK_DIR=/home/ben/.local/mfem
CMake Error: The source directory "/home/ben/projects/mfem/PyMFEM/external/mfem/cmbuild_par/TRUMPACK_DIR=/home/ben/.local/mfem" does not exist.
Specify --help for usage, or press the help button on the CMake GUI.
Failed when calling command: cmake .. -DCMAKE_VERBOSE_MAKEFILE=1 -DBUILD_SHARED_LIBS=1 -DMFEM_ENABLE_EXAMPLES=1 -DMFEM_ENABLE_MINIAPPS=1 -DCMAKE_SHARED_LINKER_FLAGS=-L/home/ben/.local/mfem/lib -L/home/ben/.local/mfem/lib -DMFEM_USE_ZLIB=1 -DCMAKE_CXX_FLAGS=-std=c++11 -DCMAKE_CXX_COMPILER=mpic++ -DMFEM_USE_EXCEPTIONS=0 -DCMAKE_INSTALL_PREFIX=/home/ben/.local/mfem/par -DMFEM_USE_MPI=1 -DMFEM_USE_METIS_5=1 -DHYPRE_DIR=/home/ben/.local/mfem -DMETIS_DIR=/home/ben/.local/mfem -DMFEM_USE_STRUMPACK=1 -STRUMPACK_DIR=/home/ben/.local/mfem
Traceback (most recent call last):
  File "setup.py", line 1110, in <module>
    main()
  File "setup.py", line 1106, in main
    run_setup()
  File "setup.py", line 1094, in run_setup
    setup(
  File "/usr/lib/python3/dist-packages/setuptools/__init__.py", line 144, in setup
    return distutils.core.setup(**attrs)
  File "/usr/lib/python3.8/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/usr/lib/python3.8/distutils/dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "setup.py", line 916, in run
    _install.run(self)
  File "/usr/lib/python3/dist-packages/setuptools/command/install.py", line 65, in run
    orig.install.run(self)
  File "/usr/lib/python3.8/distutils/command/install.py", line 589, in run
    self.run_command('build')
  File "/usr/lib/python3.8/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/usr/lib/python3.8/distutils/command/build.py", line 135, in run
    self.run_command(cmd_name)
  File "/usr/lib/python3.8/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "setup.py", line 948, in run
    cmake_make_mfem(serial=False)
  File "setup.py", line 438, in cmake_make_mfem
    cmake('..', **cmake_opts)
  File "setup.py", line 283, in cmake
    make_call(command)
  File "setup.py", line 211, in make_call
    subprocess.check_call(command, **kwargs)
  File "/usr/lib/python3.8/subprocess.py", line 364, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '..', '-DCMAKE_VERBOSE_MAKEFILE=1', '-DBUILD_SHARED_LIBS=1', '-DMFEM_ENABLE_EXAMPLES=1', '-DMFEM_ENABLE_MINIAPPS=1', '-DCMAKE_SHARED_LINKER_FLAGS=-L/home/ben/.local/mfem/lib -L/home/ben/.local/mfem/lib', '-DMFEM_USE_ZLIB=1', '-DCMAKE_CXX_FLAGS=-std=c++11', '-DCMAKE_CXX_COMPILER=mpic++', '-DMFEM_USE_EXCEPTIONS=0', '-DCMAKE_INSTALL_PREFIX=/home/ben/.local/mfem/par', '-DMFEM_USE_MPI=1', '-DMFEM_USE_METIS_5=1', '-DHYPRE_DIR=/home/ben/.local/mfem', '-DMETIS_DIR=/home/ben/.local/mfem', '-DMFEM_USE_STRUMPACK=1', '-STRUMPACK_DIR=/home/ben/.local/mfem']' returned non-zero exit status 1.
@sshiraiwa
Copy link
Member

There is a typo in the argument passed to CMake. This can be fixed easily.
However, STRUMPACK specific wrapper may require rebuilding SWIG wrapper.

@benzwick
Copy link
Member Author

It appears that the error above is fixed in 4.2.0.16 but now I get the following error. Does STRUMPACK library get installed automatically like Hypre and METIS or do I need to install it myself?

-- Looking for STRUMPACK ...
--    in STRUMPACK_DIR = /home/ben/.local/mfem
CMake Error at /usr/share/cmake-3.18/Modules/FindPackageHandleStandardArgs.cmake:165 (message):
   *** STRUMPACK not found. Please set STRUMPACK_DIR. (missing: STRUMPACK_LIBRARIES STRUMPACK_INCLUDE_DIRS) 
Call Stack (most recent call first):
  /usr/share/cmake-3.18/Modules/FindPackageHandleStandardArgs.cmake:458 (_FPHSA_FAILURE_MESSAGE)
  config/cmake/modules/MfemCmakeUtilities.cmake:623 (find_package_handle_standard_args)
  config/cmake/modules/FindSTRUMPACK.cmake:18 (mfem_find_package)
  CMakeLists.txt:270 (find_package)


-- Configuring incomplete, errors occurred!
See also "/home/ben/projects/mfem/PyMFEM/external/mfem/cmbuild_par/CMakeFiles/CMakeOutput.log".
Failed when calling command: cmake .. -DCMAKE_VERBOSE_MAKEFILE=1 -DBUILD_SHARED_LIBS=1 -DMFEM_ENABLE_EXAMPLES=1 -DMFEM_ENABLE_MINIAPPS=1 -DCMAKE_SHARED_LINKER_FLAGS=-L/home/ben/.local/mfem/lib -L/home/ben/.local/mfem/lib -DMFEM_USE_ZLIB=1 -DCMAKE_CXX_FLAGS=-std=c++11 -DCMAKE_CXX_COMPILER=mpic++ -DMFEM_USE_EXCEPTIONS=0 -DCMAKE_INSTALL_PREFIX=/home/ben/.local/mfem/par -DMFEM_USE_MPI=1 -DMFEM_USE_METIS_5=1 -DHYPRE_DIR=/home/ben/.local/mfem -DMETIS_DIR=/home/ben/.local/mfem -DMFEM_USE_STRUMPACK=1 -DSTRUMPACK_DIR=/home/ben/.local/mfem
Traceback (most recent call last):
  File "setup.py", line 1110, in <module>
    main()
  File "setup.py", line 1106, in main
    run_setup()
  File "setup.py", line 1094, in run_setup
    setup(
  File "/usr/lib/python3/dist-packages/setuptools/__init__.py", line 144, in setup
    return distutils.core.setup(**attrs)
  File "/usr/lib/python3.8/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/usr/lib/python3.8/distutils/dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "setup.py", line 916, in run
    _install.run(self)
  File "/usr/lib/python3/dist-packages/setuptools/command/install.py", line 65, in run
    orig.install.run(self)
  File "/usr/lib/python3.8/distutils/command/install.py", line 589, in run
    self.run_command('build')
  File "/usr/lib/python3.8/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/usr/lib/python3.8/distutils/command/build.py", line 135, in run
    self.run_command(cmd_name)
  File "/usr/lib/python3.8/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "setup.py", line 948, in run
    cmake_make_mfem(serial=False)
  File "setup.py", line 438, in cmake_make_mfem
    cmake('..', **cmake_opts)
  File "setup.py", line 283, in cmake
    make_call(command)
  File "setup.py", line 211, in make_call
    subprocess.check_call(command, **kwargs)
  File "/usr/lib/python3.8/subprocess.py", line 364, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '..', '-DCMAKE_VERBOSE_MAKEFILE=1', '-DBUILD_SHARED_LIBS=1', '-DMFEM_ENABLE_EXAMPLES=1', '-DMFEM_ENABLE_MINIAPPS=1', '-DCMAKE_SHARED_LINKER_FLAGS=-L/home/ben/.local/mfem/lib -L/home/ben/.local/mfem/lib', '-DMFEM_USE_ZLIB=1', '-DCMAKE_CXX_FLAGS=-std=c++11', '-DCMAKE_CXX_COMPILER=mpic++', '-DMFEM_USE_EXCEPTIONS=0', '-DCMAKE_INSTALL_PREFIX=/home/ben/.local/mfem/par', '-DMFEM_USE_MPI=1', '-DMFEM_USE_METIS_5=1', '-DHYPRE_DIR=/home/ben/.local/mfem', '-DMETIS_DIR=/home/ben/.local/mfem', '-DMFEM_USE_STRUMPACK=1', '-DSTRUMPACK_DIR=/home/ben/.local/mfem']' returned non-zero exit status 1.

@sshiraiwa
Copy link
Member

@benzwick STRUMPACK needs to be installed separately. STRUMPACK has a multiple dependencies. It requires an effort to expaned setup.py to install it automatically.

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

No branches or pull requests

2 participants