Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem building PyMFEM with SuiteSparse #250

Open
mdavids-cfs opened this issue Sep 4, 2024 · 2 comments
Open

Problem building PyMFEM with SuiteSparse #250

mdavids-cfs opened this issue Sep 4, 2024 · 2 comments

Comments

@mdavids-cfs
Copy link

Hi all,
first of all: thanks a lot for putting together this python wrapper for MFEM. I've been using MFEM for quite a while, and it's been a huge upgrade to the usability of MFEM for me.

I've been trying to build PyMFEM with SuiteSparse but cannot get it to work. I've successfully downloaded and built mfem, hypre, metis, and SuiteSparse and I am trying to build PyMFEM against these existing libraries using:

python setup.py install --with-parallel --with-suitesparse --skip-ext --mfemp-prefix=$HOME/local 
--mfem-source=$HOME/code/mfem --hypre-prefix=$HOME/local --metis-prefix=$HOME/local
--suitesparse-prefix=$HOME/code/SuiteSparse-7.8.2

"$HOME/local" has the lib and include folders with the neccessary headers and lib files. The parallel MFEM was also build with hypre, metis, and SuiteSparse, and I was able to run the UMFpack solver in one of the MFEM examples.

In file included from schwarz_wrap.cxx:4107:
./../../headers/schwarz.cpp:1059:29: error: unknown type name 'UMFPackSolver'
         PatchInv[ip] = new UMFPackSolver;
                            ^
./../../headers/schwarz.cpp:1060:24: error: no member named 'Control' in 'mfem::GMRESSolver'
         PatchInv[ip]->Control[UMFPACK_ORDERING] = UMFPACK_ORDERING_AMD;
         ~~~~~~~~~~~~  ^
./../../headers/schwarz.cpp:1060:32: error: use of undeclared identifier 'UMFPACK_ORDERING'
         PatchInv[ip]->Control[UMFPACK_ORDERING] = UMFPACK_ORDERING_AMD;
                               ^
./../../headers/schwarz.cpp:1060:52: error: use of undeclared identifier 'UMFPACK_ORDERING_AMD'
         PatchInv[ip]->Control[UMFPACK_ORDERING] = UMFPACK_ORDERING_AMD;
                                                   ^
./../../headers/schwarz.cpp:1145:29: error: unknown type name 'UMFPackSolver'
         PatchInv[ip] = new UMFPackSolver;
                            ^

Could it be that PyMFEM is not linking against the UMFpack library libumfpack.a? It's located in "$HOME/local"
Any help is greatly appreciated!
Mathias

PS: Is there any plans to include a direct solver in the automatic build process of PyMFEM? I think that would be incredibly helpful for many users!

@sshiraiwa
Copy link
Member

Hi @mdavids-cfs, I could be wrong on this. But, I think that UMFPack is a serial solver? If you want to use MPI (--with-parallel), we need to use a different solver. Having this said, I haven't looked at how straightforward it is to do so in Python. However, I think it will be an good enhancement.

@mdavids-cfs
Copy link
Author

Hi @sshiraiwa ,
thanks for the hint. I thought I was able to build the normal (C++) version of MFEM in parallel with SuiteSparse but I may be wrong. Let me look into that..
Thanks,
Mathias

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants
@sshiraiwa @mdavids-cfs and others