NCAR / ParallelIO

A high-level Parallel I/O Library for structured grid applications
Apache License 2.0
134 stars 52 forks source link

Installation error for installing ParallelIO #1942

Closed MuzafarWani closed 1 year ago

MuzafarWani commented 1 year ago

I am trying to install PIO version 2_5_9. When I try to install I am getting error

Could NOT find NetCDF_Fortran (missing: NetCDF_Fortran_LIBRARY NetCDF_Fortran_INCLUDE_DIR)

I have installed netcdf and pnetcdf libraries and environment variables are pointing to the installation directory of both. CMakeOutput.txt

MuzafarWani commented 1 year ago

checked the directory $NETCDF_PATH/lib and doesn't contains libnetcdff.a and/or libnetcdff.so How do I fix this. I have installed netcdf from https://github.com/Unidata/netcdf-c

MuzafarWani commented 1 year ago

I also later installed netcdf-fortan from unidata.ucar.edu/pub/netcdf/netcdf-fortran-4.4.4.tar.gz but still the same issue

jedwards4b commented 1 year ago

Did you install netcdf-fortran in the same directory or a different one? Are you using the autoconf or the cmake build system?

MuzafarWani commented 1 year ago

I installed netcdf-fortran in below directories

/home/muzafar/installs/netcdf-c /home/muzafar/installs/netcdf-f

I am using cmake

jedwards4b commented 1 year ago

add these arguments to cmake -DNetCDF_C_LIBRARY=/home/muzafar/installs/netcdf-c/lib -DNetCDF_C_INCLUDE_DIR=/home/muzafar/installs/netcdf-c/include -DNetCDF_Fortran_LIBRARY=/home/muzafar/installs/netcdf-f/lib -DNetCDF_Fortran_INCLUDE_DIR=/home/muzafar/installs/netcdf-f/include

MuzafarWani commented 1 year ago

by cmake you mean CMake_Lists.txt or somewhere else?

jedwards4b commented 1 year ago

In your cmake command line.

MuzafarWani commented 1 year ago

cmake went fine but now make is giving Cannot open module file ‘mpi.mod’ for reading at (1): No such file or directory mpi.mod is present in mpi install. How do I pass that as parameter

jedwards4b commented 1 year ago

CC=mpicc FC=mpif90 does it on most systems. So your cmake command line should look something like:

CC=mpicc FC=mpif90 cmake -DNetCDF_C_LIBRARY=/home/muzafar/installs/netcdf-c/lib -DNetCDF_C_INCLUDE_DIR=/home/muzafar/installs/netcdf-c/include -DNetCDF_Fortran_LIBRARY=/home/muzafar/installs/netcdf-f/lib -DNetCDF_Fortran_INCLUDE_DIR=/home/muzafar/installs/netcdf-f/include /path/to/parallelio/

MuzafarWani commented 1 year ago

Yes. I have cmake already that way. Should I pass the location of the mpi.mod as parameter

MuzafarWani commented 1 year ago

The last part you have mentioned "/path/to/parallelio/" which path is this. Is this where PIO will be installed or the path to the source

jedwards4b commented 1 year ago

It's a path to the source. If you already have the cmake command line that way then make sure that mpi.mod exists in your mpi. If it does you can add -DCMAKE_Fortran_FLAGS=-I/path/to/mpi/include

MuzafarWani commented 1 year ago

I did include -DCMAKE_Fortran_FLAGS=-I/path/to/mpi/include Now it is showing fatal error: mpi.h: No such file or directory which is present in the path/to/mpi/include

I am pasting all the warning the cmake command is showing -- Could NOT find CURL (missing: CURL_LIBRARY CURL_INCLUDE_DIR) -- Could NOT find HDF5_HL (missing: HDF5_HL_LIBRARY HDF5_HL_INCLUDE_DIR) -- Could NOT find HDF5_C (missing: HDF5_C_LIBRARY HDF5_C_INCLUDE_DIR) Fortran Library build is ON -- Could NOT find PnetCDF_C (missing: PnetCDF_C_LIBRARY PnetCDF_C_INCLUDE_DIR) -- Could NOT find PnetCDF_Fortran (missing: PnetCDF_Fortran_LIBRARY PnetCDF_Fortran_INCLUDE_DIR) -- MPI Fortran module verified and enabled. -- Using internal GPTL C library for timing -- MPIIO failed verification and therefore disabled. -- MPI Fortran module verified and enabled. -- Using internal GPTL Fortran library for timing CMAKE_EXE_LINKER_FLAGS CMAKE_EXE_LINKER_FLAGS -- Could NOT find MPE_C (missing: MPE_C_LIBRARY MPE_C_INCLUDE_DIR) -- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE) -- # PIO Configuration Summary

General


PIO Version: 2.5.9 Configured On: Tuesday 06 December 2022 10:17:23 PM IST Host System: x86_64-Linux-5.15.0-46-generic Build Directory: /home/muzafar/Desktop/MPAS/ParallelIO-pio2_5_9 Install Prefix: /usr/local

Compiling Options


C Compiler: GNU 9.4.0 CFLAGS: -std=c99
CPPFLAGS: -DLINUX -DCPRGNU -DTIMING -DLOGGING -I/home/muzafar/Desktop/MPAS/ParallelIO-pio2_5_9 -I/home/muzafar/Desktop/MPAS/ParallelIO-pio2_5_9/src/clib -I/home/muzafar/Desktop/MPAS/ParallelIO-pio2_5_9/src/clib -I/home/muzafar/Desktop/MPAS/ParallelIO-pio2_5_9/src/clib -I/home/muzafar/Desktop/MPAS/ParallelIO-pio2_5_9/src/clib/../ncint -I/home/muzafar/Downloads/installs/netcdf/include LDFLAGS:
Shared Library: no Static Library: yes Extra libraries:

Fortran Compiler: GNU 9.4.0 FFLAGS: -I/home/muzafar/Downloads/installs/mpich/include FCFLAGS:
More Fortran Flags: -DLINUX -DCPRGNU -I/home/muzafar/Desktop/MPAS/ParallelIO-pio2_5_9 -I/home/muzafar/Desktop/MPAS/ParallelIO-pio2_5_9/src/flib -I/home/muzafar/Desktop/MPAS/ParallelIO-pio2_5_9/src/flib -I/home/muzafar/Downloads/installs/netcdf-f/include -I/home/muzafar/Downloads/installs/netcdf/include

Features


PnetCDF Support: no SZIP Write Support: no Parallel Filters: yes NetCDF/HDF5 Support: yes NetCDF/HDF5 Par I/O: no NetCDF Integration: no PIO Logging: no MPIEXEC: mpiexec Fortran: yes

Can you please check what else I need to do to fix this

jedwards4b commented 1 year ago

Try using -DCMAKE_CPP_FLAGS=-I/path/to/mpi/include instead.

MuzafarWani commented 1 year ago

Still showing the same error. Cmake is generating the warning

CMake Warning: Manually-specified variables were not used by the project:

CMAKE_CPP_FLAGS
jedwards4b commented 1 year ago

Then you will need both; -DCMAKE_C_FLAGS=-I/path/to/mpi/include -DCMAKE_Fortran_FLAGS=-I/path/to/mpi/include

MuzafarWani commented 1 year ago

-- Could NOT find MPI_C (missing: MPI_C_WORKS) CMake Error at /usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:146 (message): Could NOT find MPI (missing: MPI_C_FOUND) (found version "3.1") Call Stack (most recent call first): /usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:393 (_FPHSA_FAILURE_MESSAGE) /usr/share/cmake-3.16/Modules/FindMPI.cmake:1688 (find_package_handle_standard_args) CMakeLists.txt:172 (find_package)

MuzafarWani commented 1 year ago

After including both -DCMAKE_C_FLAGS=-I/path/to/mpi/include -DCMAKE_Fortran_FLAGS=-I/path/to/mpi/include above error for cmake

jedwards4b commented 1 year ago

Please post the complete cmake command line you are attempting or maybe you should try the autoconf build method?

MuzafarWani commented 1 year ago

CC=mpicc FC=mpif90 cmake -DNetCDF_C_LIBRARY=/home/muzafar/Downloads/installs/netcdf/lib -DNetCDF_C_INCLUDE_DIR=/home/muzafar/Downloads/installs/netcdf/include -DNetCDF_Fortran_LIBRARY=/home/muzafar/Downloads/installs/netcdf-f/lib -DNetCDF_Fortran_INCLUDE_DIR=/home/muzafar/Downloads/installs/netcdf-f/include -DCMAKE_Fortran_FLAGS=-I/home/muzafar/Downloads/installs/mpich/include -DCMAKE_C_FLAGS=/home/muzafar/Downloads/installs/mpich/include/ /home/muzafar/Desktop/MPAS/ParallelIO-pio2_5_9

MuzafarWani commented 1 year ago

How to use autoconf command?

jedwards4b commented 1 year ago

To use autoconf run autoreconf -i from the top level directory.
Then ./configure --help will give you a list of options. But I think that something about your system is messed up for this error to occur. You may want to consult with your local system administrators.

MuzafarWani commented 1 year ago

I tried using autoreconf -i and then CC=mpicc FC=mpif90 ./configure --prefix=/home/muzafar/Downloads/installs/PIO I am getting below error configure: error: Pnetcdf not found. Set CPPFLAGS/LDFLAGS or use --disable-pnetcdf.

Sorry it is night here in India and there is no one around to check the issue with the system. I need PIO installed for MPAS installation

jedwards4b commented 1 year ago

The instructions here are clear are they not? : Pnetcdf not found. Set CPPFLAGS/LDFLAGS or use --disable-pnetcdf.