GithubHelp home page GithubHelp logo

Type mismatch error about piclas HOT 7 CLOSED

piclas-framework avatar piclas-framework commented on June 18, 2024
Type mismatch error

from piclas.

Comments (7)

kopperp avatar kopperp commented on June 18, 2024 1

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, pmodels/mpich#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

from piclas.

habtie-phys avatar habtie-phys commented on June 18, 2024

Hi,

Thank you for the detailed explanation. I will follow your recommendation and let you know the result.

from piclas.

habtie-phys avatar habtie-phys commented on June 18, 2024

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.

from piclas.

kopperp avatar kopperp commented on June 18, 2024

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.

from piclas.

habtie-phys avatar habtie-phys commented on June 18, 2024

Hi sorry, LIBS_BUILD_HDF5=ON resolves the issue. sorry I noticed that I have made a stupid typo mistake in ccmake ..

from piclas.

habtie-phys avatar habtie-phys commented on June 18, 2024

now it is installed without an issue

from piclas.

kopperp avatar kopperp commented on June 18, 2024

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.

from piclas.

Related Issues (19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.