Closed MuzafarWani closed 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
I also later installed netcdf-fortan from unidata.ucar.edu/pub/netcdf/netcdf-fortran-4.4.4.tar.gz but still the same issue
Did you install netcdf-fortran in the same directory or a different one? Are you using the autoconf or the cmake build system?
I installed netcdf-fortran in below directories
/home/muzafar/installs/netcdf-c /home/muzafar/installs/netcdf-f
I am using cmake
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
by cmake you mean CMake_Lists.txt or somewhere else?
In your cmake command line.
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
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/
Yes. I have cmake already that way. Should I pass the location of the mpi.mod as parameter
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
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
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
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
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
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
Try using -DCMAKE_CPP_FLAGS=-I/path/to/mpi/include instead.
Still showing the same error. Cmake is generating the warning
CMake Warning: Manually-specified variables were not used by the project:
CMAKE_CPP_FLAGS
Then you will need both; -DCMAKE_C_FLAGS=-I/path/to/mpi/include -DCMAKE_Fortran_FLAGS=-I/path/to/mpi/include
-- 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)
After including both -DCMAKE_C_FLAGS=-I/path/to/mpi/include -DCMAKE_Fortran_FLAGS=-I/path/to/mpi/include above error for cmake
Please post the complete cmake command line you are attempting or maybe you should try the autoconf build method?
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
How to use autoconf command?
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.
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
The instructions here are clear are they not? : Pnetcdf not found. Set CPPFLAGS/LDFLAGS or use --disable-pnetcdf.
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