Closed habtie-phys closed 7 months ago
Hello,
from your error I assume that you are attempting to compile PICLAS with MPICH? Unfortunately, MPICH is missing the required interfaces demanded by the MPI standard, please see this upstream issue, https://github.com/pmodels/mpich/issues/2659.
We already have a workaround deployed in our internal development version and are currently testing it on different configurations. The fix will be included in the upcoming 3.1 release. In the meantime, please use OpenMPI or add the following code snippet to the INTERFACE
section in src/globals.f90
.
INTERFACE MPI_WIN_ALLOCATE_SHARED
SUBROUTINE PMPI_WIN_ALLOCATE_SHARED(SIZE, DISP_UNIT, INFO, COMM, BASEPTR, WIN, IERROR)
USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR
IMPORT :: MPI_ADDRESS_KIND
INTEGER :: DISP_UNIT, INFO, COMM, WIN, IERROR
INTEGER(KIND=MPI_ADDRESS_KIND) :: SIZE
TYPE(C_PTR) :: BASEPTR
END SUBROUTINE
END INTERFACE
INTERFACE MPI_WIN_SHARED_QUERY
SUBROUTINE PMPI_WIN_SHARED_QUERY(WIN, RANK, SIZE, DISP_UNIT, BASEPTR, IERROR)
USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR
IMPORT :: MPI_ADDRESS_KIND
INTEGER :: WIN, RANK, DISP_UNIT, IERROR
INTEGER(KIND=MPI_ADDRESS_KIND) :: SIZE
TYPE(C_PTR) :: BASEPTR
END SUBROUTINE
END INTERFACE
Hi,
Thank you for the detailed explanation. I will follow your recommendation and let you know the result.
Hi,
Yes, using OpenMpi resolves this issue, thanks for the immediate response again. I got another issue related to I think the hdf5 library. The error message is shown below.
[ 92%] Linking Fortran executable unitTests/bin/MortarBasis [ 92%] Linking Fortran executable bin/piclas [ 92%] Linking Fortran executable unitTests/bin/ReadInTools [ 92%] Linking Fortran executable unitTests/bin/MatrixInverse lib/libpiclas.so: error: undefined reference to 'h5pset_fapl_mpio_f_' lib/libpiclas.so: error: undefined reference to 'h5pset_dxpl_mpio_f_' collect2: error: ld returned 1 exit status make[2]: *** [CMakeFiles/MortarBasis.dir/build.make:111: unitTests/bin/MortarBasis] Error 1 make[1]: *** [CMakeFiles/Makefile2:211: CMakeFiles/MortarBasis.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs.... lib/libpiclas.so: error: undefined reference to 'h5pset_fapl_mpio_f_' lib/libpiclas.so: error: undefined reference to 'h5pset_dxpl_mpio_f_' collect2: error: ld returned 1 exit status make[2]: *** [CMakeFiles/ReadInTools.dir/build.make:111: unitTests/bin/ReadInTools] Error 1 make[1]: *** [CMakeFiles/Makefile2:151: CMakeFiles/ReadInTools.dir/all] Error 2 lib/libpiclas.so: error: undefined reference to 'h5pset_fapl_mpio_f_' lib/libpiclas.so: error: undefined reference to 'h5pset_dxpl_mpio_f_' collect2: error: ld returned 1 exit status make[2]: *** [CMakeFiles/MatrixInverse.dir/build.make:111: unitTests/bin/MatrixInverse] Error 1 make[1]: *** [CMakeFiles/Makefile2:181: CMakeFiles/MatrixInverse.dir/all] Error 2 lib/libpiclas.so: error: undefined reference to 'h5pset_fapl_mpio_f_' lib/libpiclas.so: error: undefined reference to 'h5pset_dxpl_mpio_f_' collect2: error: ld returned 1 exit status make[2]: *** [CMakeFiles/piclas.dir/build.make:111: bin/piclas] Error 1 make[1]: *** [CMakeFiles/Makefile2:429
If I understand it correctly, piclas is trying to call the h5pset_dxpl_mpio_f_
function/subroutine from the hdf5 library. When I check the hdf5 library, h5pset_dxpl_mpio_f_ is
not there but h5pset_dxpl_mpio_f
is available. I have tried to compile piclas both using the latest and the recommended version of the hdf5 library, and I have got the same error message shown above.
Hello,
glad to hear that OpenMPI is working. Regarding your HDF5 issue, PICLAS can compile most of required libraries on demand. To rule out any issues with compile flags, please try compiling PICLAS with LIBS_BUILD_HDF5=ON
set in CMake and let me know if that resolves the issue.
Hi sorry, LIBS_BUILD_HDF5=ON resolves the issue. sorry I noticed that I have made a stupid typo mistake in ccmake ..
now it is installed without an issue
Hello, glad to hear PICLAS is working for you now. If you want to use identical compile flags for local installation of HDF5, you can find them here or in the following.
./src/HDF5/configure --with-pic --enable-fortran --enable-parallel --enable-build-mode=production --enable-silent-rules --disable-dependency-tracking
Please close this issue if your problem has been resolved. Do not hesitate to reach out again if any new issue arises in the future.
Hello, I am getting the following error during compilation
Error: Type mismatch in argument ‘baseptr’ at (1); passed TYPE(c_ptr) to INTEGER(8) piclas/src/mpi/mpi_shared.f90:268:112
Could you please help me resolving this issue?