GithubHelp home page GithubHelp logo

How to compile with parmetis? about mumps HOT 1 CLOSED

scivision avatar scivision commented on August 19, 2024
How to compile with parmetis?

from mumps.

Comments (1)

miaodi avatar miaodi commented on August 19, 2024

My parmetis version is 4.0.3. It seems that when parmetis is enable, mumps needs both metis and parmetis to finish the compilation.

I modified FindMETIS.cmake:

if("parallel" IN_LIST METIS_FIND_COMPONENTS)
  find_library(PARMETIS_LIBRARY
    NAMES parmetis
    PATH_SUFFIXES METIS libmetis
    DOC "ParMETIS library"
    )
  if(PARMETIS_LIBRARY)
    set(METIS_parallel_FOUND true)

    find_path(PARMETIS_INCLUDE_DIR
    NAMES parmetis.h
    PATH_SUFFIXES METIS openmpi-x86_64 mpich-x86_64 
    DOC "METIS include directory"
    )
  endif()
endif()

find_library(METIS_LIBRARY
  NAMES metis
  PATH_SUFFIXES METIS libmetis
  DOC "METIS library"
  )

find_path(METIS_INCLUDE_DIR
NAMES metis.h
PATH_SUFFIXES METIS openmpi-x86_64 mpich-x86_64
DOC "METIS include directory"
)

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(METIS
REQUIRED_VARS METIS_LIBRARY METIS_INCLUDE_DIR
HANDLE_COMPONENTS
)

if(METIS_FOUND)

set(METIS_LIBRARIES ${PARMETIS_LIBRARY} ${METIS_LIBRARY})
set(METIS_INCLUDE_DIRS ${METIS_INCLUDE_DIR} ${PARMETIS_INCLUDE_DIR})

message(VERBOSE "METIS libraries: ${METIS_LIBRARIES}
METIS include directories: ${METIS_INCLUDE_DIRS}")

if(NOT TARGET METIS::METIS)
  add_library(METIS::METIS INTERFACE IMPORTED)
  set_property(TARGET METIS::METIS PROPERTY INTERFACE_LINK_LIBRARIES "${METIS_LIBRARIES}")
  set_property(TARGET METIS::METIS PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${METIS_INCLUDE_DIRS}")
endif()
endif(METIS_FOUND)

mark_as_advanced(METIS_INCLUDE_DIR METIS_LIBRARY PARMETIS_LIBRARY)

and now it can compile mumps with parmetis (cmake .. -Dparmetis=1 -Dparallel=1 -DMETIS_ROOT=/home/dimiao/installed/metis -DPARMETIS_LIBRARY=/home/dimiao/installed/parmetis/lib/libparmetis.so -DPARMETIS_INCLUDE_DIR=/home/dimiao/installed/parmetis/include/).

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.