GithubHelp home page GithubHelp logo

Comments (8)

scivision avatar scivision commented on September 28, 2024

I would use the Ninja or MinGW Makefiles generator instead of Visual Studio. I've never gotten Visual Studio to work. I should update the message to note that. I almost always use Ninja as it generally works faster and more reliably than GNU Make. https://github.com/ninja-build/ninja/releases

from mumps.

scivision avatar scivision commented on September 28, 2024

Now, using Visual Studio emits an error as I don't know how to make VS work with Mumps

from mumps.

dariomangoni avatar dariomangoni commented on September 28, 2024

@koutoui just for reference: the approach here followed mixes C and Fortran source files all at once (e.g. mumps_common).
Visual Studio then considers the target as C/C++ code, but actually the compiler options that are passed are for the Fortran compiler.
In order to overcome this issue I think that you have to compile (where "compile" is used in the strict sense i.e. without linking) C and Fortran file in separate object files, then link the two object files in a single library.
Something like:

ADD_LIBRARY(mumps_common
                        $<TARGET_OBJECTS:MUMPS_COMMON_OBJ_FORTRAN>
                        $<TARGET_OBJECTS:MUMPS_COMMON_OBJ_C>
                        ${MUMPS_COMMON_EXPORTS})

(here the MUMPS_COMMON_EXPORTS are used to allow the symbol exposition that was probably needed because I was compiling shared libraries and I don't know if MUMPS_CALL was enough to export all the symbols needed)
This allowed me to compile Mumps in Windows directly in VS and also as shared library at least for 5.1.2 (the last time I tried) but it is quite stressful operation.

from mumps.

scivision avatar scivision commented on September 28, 2024

Yes I tried this in "objects" branch but had problems with the cyclical links in Mumps.
I think this is a worthwhile improvement. To do this, I will probably have to start with the original Mumps Makefiles, mimicking their numerous object file creation. Once that works, I can combine into fewer object files perhaps, or just so some foreach() loops.

from mumps.

dariomangoni avatar dariomangoni commented on September 28, 2024

If it can be of any help this is my full CMakeLists (dated back to Mumps 5.1.1) that I've used for a while to build Mumps for our software.
However, what I did is to merge all the libraries in just one shared library. Probably this overcame the problem, but then you won't have the standard set of files (mumps_common, dmumps, etc will be collapsed in a single libdmumps).
CMakeLists_5.1.1.txt

from mumps.

scivision avatar scivision commented on September 28, 2024

OK thank you!

from mumps.

eremite-ever avatar eremite-ever commented on September 28, 2024

This project is too awesome!
but I also encountered this link problem in Windows(intel toochain with msvc), and I am looking forward to a good solution!

dmumps.lib(mumps_c.obj) : error LNK2019: unresolved external symbol DMUMPS_SET_TMP_PTR referenced in function DMUMPS_SET_TMP_PTR_C
dmumps.lib(mumps_c.obj) : error LNK2019: unresolved external symbol DMUMPS_F77 referenced in function dmumps_c

from mumps.

scivision avatar scivision commented on September 28, 2024

For both #1 and #2, despite recent MUMPS CMake enhancement re: shared libs, on Windows with Intel oneAPI (icl/ifort or icx/ifx) shared libs still don't work. This may be an upstream MUMPS issue. Using static libs (the default) does work.

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.