GithubHelp home page GithubHelp logo

Comments (8)

vchunchu-amd avatar vchunchu-amd commented on September 28, 2024

The problem seems to be in enabling intsize64 option and linking ILP64 enabled numeric libraries.
LP64 (intsize64=off) works fine provided I link LP64 numeric libraries.

Any specific code changes needed to work with ILP64(intsize64) option?

from mumps.

scivision avatar scivision commented on September 28, 2024

I don't know offhand, I haven't used the intsize64 myself.

from mumps.

scivision avatar scivision commented on September 28, 2024

I looked at this for v5.4.1.5. I don't know how to make oneAPI work with intsize64. GCC itself does work without MKL

from mumps.

vchunchu-amd avatar vchunchu-amd commented on September 28, 2024

On further debugging, Using the MPI API MPI_Type_size( ) to get the size of mpi datatype MPI_INTEGER reveals some important findings.

  1. with Mumps intsize64=on and calling MPI_Type_size(MPI_INTEGER, sz, ierrsiz) in dmumps_driver.F prints size "4"

  2. A standalone fortran test code compiled using mpiifort and -i8 flag, prints the size as "8". attached test source and build log.

So, MPI_INTEGER seems to be of size 4 bytes even when "intsize64=on" in mumps which seems to cause the problem.
Kindly check.
build_test_fortransource.txt
test.f90.txt

from mumps.

scivision avatar scivision commented on September 28, 2024

Maybe I've got the options wrong. If you do a fresh CMake build using Intel compiler starting with

 cmake -Dintsize64=on -DCMAKE_Fortran_FLAGS=-i8 

do the tests work?

from mumps.

vchunchu-amd avatar vchunchu-amd commented on September 28, 2024

I tried enabling "CMAKE_Fortran_FLAGS" to "-i8" as suggested. The tests still fail to execute. Also the compilers.cmake has FORTRAN_FLAG_INT64 set to "i8" flags for fortran compilation as part of mumps build system. The flag gets used for compilation which I made sure from build log.

I tried to reproduce this error in a standalone fortran test code using 2 scenarios,

  1. using a single line command to compile an executable directly
    mpiifort -o test.exe -i8 test.f90
  2. using a CmakeLists file to compile the test with necessary Fortran 64 bit "-i8" option and find_package(MPI). I made sure MPI libraries are picked (impi.lib, libmpi_ilp64.lib) and MPI_Fortran_Compiler points to mpiifort

I use a test of determining the size of MPI_INTEGER using an API MPI_Type_size( ) to check if 64 bit environment is enabled for Fortran/MPI setup.
call MPI_Type_size(MPI_INTEGER, sz, ierrsiz)
print *, 'sizeof(MPI_INTEGER) ', sz
Scenario 1 prints correct size of 8 bytes (64 bit)
Scenario 2 prints incorrect size of 4 bytes ( 32 bit)
I do use "-i8" option in Cmake build system to enable 64 bit environment. But MPI still seems to be 32 bit.
Attached these sample files for reference.
CMakeLists.txt
fortran_test_build.txt
test.f90.txt
test_cmakelists_example.f90.txt

from mumps.

vchunchu-amd avatar vchunchu-amd commented on September 28, 2024

Adding the below line in tests/CMakelists.txt to include Intel MPI Libraries explicitly helped solve the ILP64 issue for me. A specific Intel's ILP64 MPI library needs to be linked first ("libmpi_ilp64.lib")

Kindly check
...
target_link_libraries(Csimple PRIVATE ${IMPI_LIB_ILP64} ${MPI_C_LIBRARIES} MUMPS::MUMPS ${NUMERIC_LIBS})
...

where the new variables are as follows:

  1. find_library(IMPI_LIB_ILP64
    NAMES libmpi_ilp64
    HINTS ${USER_PROVIDED_IMPILIB_ILP64_PATH})

        -----USER_PROVIDED_IMPILIB_ILP64_PATH="C:/Program Files (x86)/Intel/oneAPI/mpi/2021.3.0/lib"
    
  2. MPI_C_LIBRARIES is populated by "find_package(MPI COMPONENTS C Fortran REQUIRED)"

from mumps.

scivision avatar scivision commented on September 28, 2024

Thank you, I also observe that the IntelMPI "mpi_ilp64" library is the vital missing piece to being able to run int64 MUMPS

from mumps.

Related Issues (20)

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.