Hypre Library Installation for Windows

Discussion about building and installing Elmer
Post Reply
thiennz
Posts: 6
Joined: 27 Sep 2022, 21:42
Antispam: Yes

Hypre Library Installation for Windows

Post by thiennz »

I've been running into issues installing Hypre v2.29.0 on my Windows machine to use in Elmer. Not sure if this is the right place but I haven't had any luck finding a solution elsewhere.

I have Elmer 9.0 and Microsoft MPI v10.1.3 installed already and have been going through the CMake installation section of Hyprehttps://github.com/hypre-space/hypre/bl ... INSTALL.md.

When I configure the source files in CMake 3.27.1 I get the following error
Selecting Windows SDK version 10.0.22000.0 to target Windows 10.0.22621.
NOTE: Could not find .git directory
Could NOT find MPI_C (missing: MPI_C_LIB_NAMES MPI_C_HEADER_DIR MPI_C_WORKS)
CMake Error at C:/Program Files/CMake/share/cmake-3.27/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find MPI (missing: MPI_C_FOUND)
Call Stack (most recent call first):
C:/Program Files/CMake/share/cmake-3.27/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
C:/Program Files/CMake/share/cmake-3.27/Modules/FindMPI.cmake:1837 (find_package_handle_standard_args)
CMakeLists.txt:666 (find_package)
raback
Site Admin
Posts: 4832
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: Hypre Library Installation for Windows

Post by raback »

Hi,

We compile Elmer for Windows using MSYS2. There seems to be a precompiled Hypre package for it in:
https://packages.msys2.org/package/ming ... 6_64-hypre

Here are some related scripts that have been untouched for long. I think the above package was not available then:
https://www.nic.funet.fi/pub/sci/physic ... s/scripts/

-Peter
thiennz
Posts: 6
Joined: 27 Sep 2022, 21:42
Antispam: Yes

Re: Hypre Library Installation for Windows

Post by thiennz »

Hi,

Thanks for the reply with the helpful resources.

I've been having some trouble following the compilation instructions https://github.com/ElmerCSC/elmerfem/bl ... s-msys2.md.

I'm still running into the same issue on CMake trying to include the MPI libraries. I have MSMPI installed already from a previous Elmer installation and have dug around where it is installed in my Program Files but can't find the corresponding MPI_C library.

Wondering if there is something obvious I'm missing as I haven't found any solutions searching online as well. I've included the full log from my attempt to build below. Thanks in advance!

Code: Select all

$ cmake -G "MSYS Makefiles" -DWITH_ELMERGUI:BOOL=TRUE -DWITH_MPI:BOOL=TRUE -DWITH_Hypre:BOOL=TRUE -DCMAKE_INSTALL_PREFIX=../install -DCMAKE_Fortran_COMPILER=/mingw64/bin/gfortran.exe -DQWT_INCLUDE_DIR=C:/msys64/mingw64/include/qwt-qt5/ -DWIN32:BOOL=TRUE -DCPACK_BUNDLE_EXTRA_WINDOWS_DLLS:BOOL=TRUE ../elmerfem
CMake Warning (dev) at CMakeLists.txt:17 (PROJECT):
  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 Fortran compiler identification is GNU 13.2.0
-- The C compiler identification is GNU 13.2.0
-- The CXX compiler identification is GNU 13.2.0
-- Detecting Fortran compiler ABI info
-- Detecting Fortran compiler ABI info - done
-- Check for working Fortran compiler: C:/msys64/mingw64/bin/gfortran.exe - skipped
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/msys64/mingw64/bin/cc.exe - 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: C:/msys64/mingw64/bin/c++.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Warning (dev) at CMakeLists.txt:20 (CMAKE_MINIMUM_REQUIRED):
  Compatibility with CMake < 2.4 is not supported by CMake >= 3.0.
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Deprecation Warning at CMakeLists.txt:20 (CMAKE_MINIMUM_REQUIRED):
  Compatibility with CMake < 3.5 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


-- Checking whether GFortran version >= 7 -- yes
CMake Warning at cmake/Modules/FindMPI.cmake:406 (message):
  Unable to find MPI library :libmsmpi.dll.a
Call Stack (most recent call first):
  cmake/Modules/FindMPI.cmake:597 (interrogate_mpi_compiler)
  CMakeLists.txt:227 (FIND_PACKAGE)


CMake Error at cmake/Modules/FindPackageHandleStandardArgs.cmake:108 (message):
  Could NOT find MPI_C (missing: MPI_C_LIBRARIES)
Call Stack (most recent call first):
  cmake/Modules/FindPackageHandleStandardArgs.cmake:315 (_FPHSA_FAILURE_MESSAGE)
  cmake/Modules/FindMPI.cmake:615 (find_package_handle_standard_args)
  CMakeLists.txt:227 (FIND_PACKAGE)
Post Reply