Opened 2 years ago
Last modified 11 months ago
#66209 assigned defect
netcdf does not compile with mpich or openmpi
Reported by: | massonseb | Owned by: | tenomoto (Takeshi Enomoto) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.8.0 |
Keywords: | Cc: | jmon12, Dave-Allured (Dave Allured) | |
Port: | netcdf |
Description
I am using macOS 12.6.1 with ARM64 (Apple M1 Pro) and I am trying to compile netcdf.
port install netcdf +gcc12 works fine.
but netcdf +gcc12 +openmpi or netcdf +gcc12 +mpich fail to configure:
---> Configuring netcdf Error: Failed to configure netcdf: consult /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_netcdf/netcdf/work/build/CMakeFiles/CMakeError.log Error: Failed to configure netcdf: configure failure: command execution failed Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_netcdf/netcdf/main.log for details. Error: Follow https://guide.macports.org/#project.tickets if you believe there is a bug. Error: Processing of port netcdf failed
In both cases, the error message in the main.log file is :
with openmpi:
:info:configure -- Found MPI_C: /opt/local/bin/mpicc-openmpi-gcc12 (found version "3.1") :info:configure -- Could NOT find MPI_CXX (missing: MPI_CXX_WORKS) :info:configure CMake Error at /opt/local/share/cmake-3.23/Modules/FindPackageHandleStandardArgs.cmake:230 (message): :info:configure Could NOT find MPI (missing: MPI_CXX_FOUND) (found version "3.1") :info:configure Call Stack (most recent call first): :info:configure /opt/local/share/cmake-3.23/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE) :info:configure /opt/local/share/cmake-3.23/Modules/FindMPI.cmake:1830 (find_package_handle_standard_args) :info:configure CMakeLists.txt:1426 (FIND_PACKAGE) :info:configure -- Configuring incomplete, errors occurred!
with mpich:
:info:configure -- Found MPI_C: /opt/local/bin/mpicc-mpich-gcc12 (found version "4.0") :info:configure -- Could NOT find MPI_CXX (missing: MPI_CXX_WORKS) :info:configure CMake Error at /opt/local/share/cmake-3.23/Modules/FindPackageHandleStandardArgs.cmake:230 (message): :info:configure Could NOT find MPI (missing: MPI_CXX_FOUND) (found version "4.0") :info:configure Call Stack (most recent call first): :info:configure /opt/local/share/cmake-3.23/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE) :info:configure /opt/local/share/cmake-3.23/Modules/FindMPI.cmake:1830 (find_package_handle_standard_args) :info:configure CMakeLists.txt:1426 (FIND_PACKAGE) :info:configure -- Configuring incomplete, errors occurred!
I attach the 2 log files (netcdf_openmpi.log and netcdf_mpich.log)
Thank you for your help,
Sébastien
Attachments (2)
Change History (6)
Changed 2 years ago by massonseb
Attachment: | netcdf_openmpi.log added |
---|
Changed 2 years ago by massonseb
Attachment: | netcdf_mpich.log added |
---|
configure log file for netcdf +gcc12 +mpich
comment:1 Changed 2 years ago by jmroot (Joshua Root)
Owner: | set to tenomoto |
---|---|
Status: | new → assigned |
comment:2 Changed 13 months ago by jmon12
cmake
is not finding the MPI compilers (e.g. mpicc-openmpi-mp
) etc...
In my case, selecting a macports MPI environments allowed cmake
to find the compilers correctly. Just follow the instructions of the notes of the MPI port you have installed. Here is an example with openmpi-default
:
# Get the instruction: this varies depending on your installed port port notes openmpi-default # Follow the instructions: set the wrappers as default sudo port select --set mpi openmpi-mp-fortran
You might alternatively play with cmake variables, e.g. add a -DCMAKE_PREFIX_PATH
in the configure.args-append
instruction in the Portfile, but I didn't experiment with that.
comment:3 Changed 13 months ago by jmon12
Cc: | jmon12 added |
---|
comment:4 Changed 11 months ago by Dave-Allured (Dave Allured)
Cc: | Dave-Allured added |
---|
configure log file for netcdf +gcc12 +openmpi