Coder Social home page Coder Social logo

scivision / mumps-deprecated Goto Github PK

View Code? Open in Web Editor NEW
42.0 4.0 8.0 22.2 MB

Replace by https://github.com/scivision/mumps

Home Page: https://github.com/scivision/mumps-cmake

License: Other

Makefile 0.12% C 3.27% C++ 0.32% Fortran 95.50% CMake 0.41% MATLAB 0.10% HTML 0.09% Scilab 0.08% Shell 0.02% Meson 0.03% Python 0.05% NASL 0.01%
cmake fortran mumps fortran-library

mumps-deprecated's Introduction

Replaced by mumps which is more efficient build.

MUMPS

ci_build ci ci_mac ci_windows

This is a mirror of original MUMPS code, with build system enhancements to:

  • build MUMPS in parallel 10x faster than the Makefiles
  • allow easy reuse of MUMPS in external projects via CMake FetchContent

Compatible systems

Many compilers and systems are supported by CMake build system on Windows, MacOS and Linux. Please open a GitHub Issue if you have a problem building Mumps with CMake. Some compiler setups are not ABI compatible, that isn't a build system issue.

The compiler platforms known to work with MUMPS and CMake include:

  • Windows (use -G Ninja or -G "MinGW Makefiles")
    • MSYS2 (GCC)
    • Windows Subsystem for Linux (GCC)
    • Intel oneAPI
  • MacOS
    • GCC (Homebrew)
    • Intel oneAPI
  • Linux
    • GCC
    • Intel oneAPI
    • NVIDIA HPC SDK

Build

After "git clone" this repo:

cmake --preset=ninja
cmake --build build

MSYS2 MinGW MPI setup

MinGW via MSYS2 on Windows works well with MUMPS and MS-MPI via this procedure.

Don't use Visual Studio

For Windows in general (including with Intel compiler) we suggest using Ninja:

cmake -G Ninja -B build

or GNU Make:

cmake -G "MinGW Makefiles" -B build

as the CMake Visual Studio backend does not work.

Usage

To use MUMPS as via CMake FetchContent, in the project add:

include(FetchContent)
FetchContent_Declare(MUMPS_proj
  GIT_REPOSITORY https://github.com/scivision/mumps.git
  GIT_TAG v5.3.4.0
)

FetchContent_MakeAvailable(MUMPS_proj)

# --- your code
add_executable(foo foo.f90)
target_link_libraries(foo MUMPS::MUMPS)

Build options

Numerous build options are available as in the following sections. Most users can just use the defaults.

autobuild prereqs

The -Dautobuild=true CMake default will download and build a local copy of Lapack and/or Scalapack if missing or broken.

MPI / non-MPI

For systems where MPI, BLACS and SCALAPACK are not available, or where non-parallel execution is suitable, the default parallel=on can be disabled at CMake configure time by option -Dparallel=false.

Precision

The default precision is "s;d" meaning real float64 and float32. The build-time parameter

cmake -Darith="s;d"

may be optionally specified:

-Darith=s  # real32
-Darith=d  # real64
-Darith=c  # complex64
-Darith=z  # complex128

More than one precision may be specified simultaneously like:

cmake -Darith="s;d;c;z" -B build

ordering

To use Metis and/or Scotch, add configure options like:

cmake -B build -Dmetis=true -Dscotch=true

OpenMP

OpenMP can make MUMPS over 10x slower in certain situations. Try with and without OpenMP to see which is faster for your situation. Default is OpenMP OFF.

-Dopenmp=true / false

Install

Installing avoids having to build MUMPS repeatedly in external projects. Set environment variable MUMPS_ROOT= path to your MUMPS install to find this MUMPS.

CMake:

cmake -B build -DCMAKE_INSTALL_PREFIX=~/mylibs/mumps/

cmake --build build

cmake --install build

other

To fully specify prerequisite library locations add options like:

FC=gfortran-9 cmake -DSCALAPACK_ROOT=~/lib_gcc/scalapack -DMPI_ROOT=~/lib_gcc/openmpi-3.1.3

If you need to specify MPI compiler wrappers, do like:

FC=~/lib_gcc/openmpi-3.1.4/bin/mpif90 CC=~/lib_gcc/openmpi-3.1.4/bin/mpicc cmake -B build -DMPI_ROOT=~/lib_gcc/openmpi-3.1.4

Example

To test your newly install Mumps:

cd examples

cmake -B build

cmake --build build

cd build

ctest

prebuilt

Instead of compiling, one may install precompiled libraries by:

  • Ubuntu: apt install libmumps-dev
  • CentOS: yum install MUMPS-openmpi

MUMPS is available for Linux, OSX and Windows.

OSX

Reference

brew install brewsci-mumps

mumps-deprecated's People

Contributors

aluaces avatar scivision avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

mumps-deprecated's Issues

Mumps on Windows

Dear administrator,
Thanks for providing the Cmake files. I tried on Windows 10 64bit + Visual Studio 2019 + Intel Fortran 2020, the following errors displayed:

`CMake Error in C:/solver/mumps-master/64bit/CMakeFiles/CMakeTmp/CMakeLists.txt:
Imported target "MPI::MPI_C" includes non-existent path

"C:/Program Files (x86)/Intel/MPI/4.1.3.047/intel64/include"

in its INTERFACE_INCLUDE_DIRECTORIES. Possible reasons include:

  • The path was deleted, renamed, or moved to another location.

  • An install or uninstall procedure did not complete successfully.

  • The installation package was faulty and references files it does not
    provide.

CMake Error in C:/solver/mumps-master/64bit/CMakeFiles/CMakeTmp/CMakeLists.txt:
Imported target "MPI::MPI_C" includes non-existent path

"C:/Program Files (x86)/Intel/MPI/4.1.3.047/intel64/include"

in its INTERFACE_INCLUDE_DIRECTORIES. Possible reasons include:

  • The path was deleted, renamed, or moved to another location.

  • An install or uninstall procedure did not complete successfully.

  • The installation package was faulty and references files it does not
    provide.

CMake Error in C:/solver/mumps-master/64bit/CMakeFiles/CMakeTmp/CMakeLists.txt:
Imported target "MPI::MPI_C" includes non-existent path

"C:/Program Files (x86)/Intel/MPI/4.1.3.047/intel64/include"

in its INTERFACE_INCLUDE_DIRECTORIES. Possible reasons include:

  • The path was deleted, renamed, or moved to another location.

  • An install or uninstall procedure did not complete successfully.

  • The installation package was faulty and references files it does not
    provide.

CMake Error in C:/solver/mumps-master/64bit/CMakeFiles/CMakeTmp/CMakeLists.txt:
Imported target "MPI::MPI_C" includes non-existent path

"C:/Program Files (x86)/Intel/MPI/4.1.3.047/intel64/include"

in its INTERFACE_INCLUDE_DIRECTORIES. Possible reasons include:

  • The path was deleted, renamed, or moved to another location.

  • An install or uninstall procedure did not complete successfully.

  • The installation package was faulty and references files it does not
    provide.

CMake Error in C:/solver/mumps-master/64bit/CMakeFiles/CMakeTmp/CMakeLists.txt:
Imported target "MPI::MPI_C" includes non-existent path

"C:/Program Files (x86)/Intel/MPI/4.1.3.047/intel64/include"

in its INTERFACE_INCLUDE_DIRECTORIES. Possible reasons include:

  • The path was deleted, renamed, or moved to another location.

  • An install or uninstall procedure did not complete successfully.

  • The installation package was faulty and references files it does not
    provide.

CMake Error in C:/solver/mumps-master/64bit/CMakeFiles/CMakeTmp/CMakeLists.txt:
Imported target "MPI::MPI_C" includes non-existent path

"C:/Program Files (x86)/Intel/MPI/4.1.3.047/intel64/include"

in its INTERFACE_INCLUDE_DIRECTORIES. Possible reasons include:

  • The path was deleted, renamed, or moved to another location.

  • An install or uninstall procedure did not complete successfully.

  • The installation package was faulty and references files it does not
    provide.

CMake Error in C:/solver/mumps-master/64bit/CMakeFiles/CMakeTmp/CMakeLists.txt:
Imported target "MPI::MPI_C" includes non-existent path

"C:/Program Files (x86)/Intel/MPI/4.1.3.047/intel64/include"

in its INTERFACE_INCLUDE_DIRECTORIES. Possible reasons include:

  • The path was deleted, renamed, or moved to another location.

  • An install or uninstall procedure did not complete successfully.

  • The installation package was faulty and references files it does not
    provide.

CMake Error in C:/solver/mumps-master/64bit/CMakeFiles/CMakeTmp/CMakeLists.txt:
Imported target "MPI::MPI_C" includes non-existent path

"C:/Program Files (x86)/Intel/MPI/4.1.3.047/intel64/include"

in its INTERFACE_INCLUDE_DIRECTORIES. Possible reasons include:

  • The path was deleted, renamed, or moved to another location.

  • An install or uninstall procedure did not complete successfully.

  • The installation package was faulty and references files it does not
    provide.

CMake Error in C:/solver/mumps-master/64bit/CMakeFiles/CMakeTmp/CMakeLists.txt:
Imported target "MPI::MPI_C" includes non-existent path

"C:/Program Files (x86)/Intel/MPI/4.1.3.047/intel64/include"

in its INTERFACE_INCLUDE_DIRECTORIES. Possible reasons include:

  • The path was deleted, renamed, or moved to another location.

  • An install or uninstall procedure did not complete successfully.

  • The installation package was faulty and references files it does not
    provide.

CMake Error in C:/solver/mumps-master/64bit/CMakeFiles/CMakeTmp/CMakeLists.txt:
Imported target "MPI::MPI_C" includes non-existent path

"C:/Program Files (x86)/Intel/MPI/4.1.3.047/intel64/include"

in its INTERFACE_INCLUDE_DIRECTORIES. Possible reasons include:

  • The path was deleted, renamed, or moved to another location.

  • An install or uninstall procedure did not complete successfully.

  • The installation package was faulty and references files it does not
    provide.

CMake Error in C:/solver/mumps-master/64bit/CMakeFiles/CMakeTmp/CMakeLists.txt:
Imported target "MPI::MPI_C" includes non-existent path

"C:/Program Files (x86)/Intel/MPI/4.1.3.047/intel64/include"

in its INTERFACE_INCLUDE_DIRECTORIES. Possible reasons include:

  • The path was deleted, renamed, or moved to another location.

  • An install or uninstall procedure did not complete successfully.

  • The installation package was faulty and references files it does not
    provide.

CMake Error in C:/solver/mumps-master/64bit/CMakeFiles/CMakeTmp/CMakeLists.txt:
Imported target "MPI::MPI_C" includes non-existent path

"C:/Program Files (x86)/Intel/MPI/4.1.3.047/intel64/include"

in its INTERFACE_INCLUDE_DIRECTORIES. Possible reasons include:

  • The path was deleted, renamed, or moved to another location.

  • An install or uninstall procedure did not complete successfully.

  • The installation package was faulty and references files it does not
    provide.

CMake Error at C:/Program Files/CMake/share/cmake-3.16/Modules/FindMPI.cmake:1194 (try_compile):
Failed to generate test project build system.
Call Stack (most recent call first):
C:/Program Files/CMake/share/cmake-3.16/Modules/FindMPI.cmake:1245 (_MPI_try_staged_settings)
C:/Program Files/CMake/share/cmake-3.16/Modules/FindMPI.cmake:1505 (_MPI_check_lang_works)
CMakeLists.txt:55 (find_package)

Configuring incomplete, errors occurred!
`

Could you please help me to take a look at it?

Thanks,
Tang Laoya

Compiling on Windows with Intel Compilers

Hello,

I was able to use MSYS2 and Mingw64 gcc compilers to build MUMPS on Windows using Cmake and Ninja. However, there is a bug in MSMPI when compiled with gfortran that causes MPI_IN_PLACE to not work (which will lead to a segmentation fault when using a distributed RHS in MUMPS). As a result, I'm am trying to build MUMPS with the Intel compilers (which don't exhibit this MSMPI-gfortran bug) but am unsuccessful.

What is the correct way to do this on a Windows machine with Visual Studio and the MSVC compiler toolset as well as the Intel C/C++ and Fortran compilers installed (the latter being what I really want to use)? When I use the instructions presented in the readme (cmake -G Ninja -B build from a command prompt) the C and Fortran compiler identification is unknown. If I add -DCMAKE_C_COMPILER=icl etc. this doesn't help.

Thanks.

where is mkl_scala defined

Hi,

It seems that the cmake function mkl_scala is used in various places but I cannot find its definition:

20:46:05 [alainm@castor rel]# find  ~/view/ocamodules/install/mumps/5.3.5/mumps/cmake/ -type f -exec grep mkl_scala {} \; -print
  NAMES mkl_scalapack.h
    scalapack_mkl(mkl_scalapack_lp64 mkl_blacs_openmpi_lp64)
      scalapack_mkl(mkl_scalapack_lp64 mkl_blacs_mpich_lp64)
      scalapack_mkl(mkl_scalapack_lp64 mkl_blacs_mpich2_lp64.lib mpi.lib fmpich2.lib)
      scalapack_mkl(mkl_scalapack_lp64 mkl_blacs_intelmpi_lp64)
    scalapack_mkl(mkl_scalapack_lp64 mkl_blacs_intelmpi_lp64)
/beegfs/home/alainm/view/ocamodules/install/mumps/5.3.5/mumps/cmake/Modules/FindSCALAPACK.cmake
    mkl_scala(mkl_blacs_openmpi_lp64)
      mkl_scala(mkl_blacs_mpich_lp64)
      mkl_scala(mkl_blacs_mpich2_lp64.lib mpi.lib fmpich2.lib)
      mkl_scala(mkl_blacs_intelmpi_lp64)
    mkl_scala(mkl_blacs_intelmpi_lp64)
/beegfs/home/alainm/view/ocamodules/install/mumps/5.3.5/mumps/cmake/Modules/FindBLACS.cmake
20:46:11 [alainm@castor rel]# 

Do you know how I can fix this ?

Test #4: CSimpleReal64 Failed on macosx

Hello,
i'm trying your build system on macosx without success. I did the same commands on macosx (Mojave) and Ubuntu 18 LTS.
On macosx, looking at ./build/Testing/Temporary/LastTest.log:

4/9 Testing: CSimpleReal64
4/9 Test: CSimpleReal64
Command: "/Users/me/projets/mumps/build/tests/Csimple"
Directory: /Users/me/projets/mumps/build/tests
"CSimpleReal64" start time: Jan 08 16:28 CET
Output:
----------------------------------------------------------
 (PROC 68) ERROR RETURN:        INFOG(1)= -16
                                INFOG(2)= 0
<end of output>
Test time =   0.01 sec

I used the commands:

cmake -B build -Dparallel=false
cmake --build build --parallel
cmake --build build --target test 

Could you help me?

Thanks in advcance

Mumps on Windows compiled by Msys2 (mingw64)

I want to comple the mumps on windows by mingw. I installed the msmpi and scalapack in msys2 by "pacman -S mingw-w64-x86-64-msmpi" and "pacman -S mingw-w64-x86-64-scalapack".
When I compile the mumps, the cmake error shows:

CMake Error at cmake/mpi.cmake:24 (message):
MPI Fortran library mpif.h not functioning with GNU 10.2.0
Call Stack (most recent call first):
CMakeLists.txt:57 (include)

Is there any method to compole mumps on windows by mingw?

Tests fail with -Dintsize64=ON

Several tests fail with -Dintsize64=ON (using the tagged version 5.3.5)

  • all save/restore tests
  • all C tests don't fail but actually do nothing

This is caused by the fact that the Fortran compiler isn't provided with the "-fdefault-integer-8" option (or the GNU compiler). In addition, the FindLAPACK and FindSCALAPACK modules don't automatically search for the 64bits versions of these libraries, which are required to run MUMPS with 64 bits integer.

I have found a fix, I will open a pull request when it is ready.

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.