FreeFem / FreeFem-sources

FreeFEM source code
https://freefem.org/
Other
755 stars 188 forks source link

Please add PETSc and SLEPc in distributed packages #225

Closed Trophime closed 2 years ago

Trophime commented 2 years ago

Hi, it would be great if the debian/ubuntu package you provide contains all freefem plugins especially PETSc and SLEPc.

Best C

prj- commented 2 years ago

They do, cf. https://ci.inria.fr/freefem/job/FreeFEM-sources-deployDEB/25/consoleFull.
What do you mean precisely, please?

Trophime commented 2 years ago

The package for ubuntu, at 4.11 version, does not containt PETSc.so :((

sgarnotel commented 2 years ago

Did you install FreeFEM-4.11-amd64.deb or FreeFEM-4.11-amd64-ubuntu20.04.deb ?

prj- commented 2 years ago

You are looking at the wrong place of the Jenkins log. It says down below:

../seq/ff-c++ -auto -mpi PETSc.cpp
eval ../seq/ff-c++ '-mpi' PETSc.cpp -std=c++14 -std=c++14 -DWITH_slepc -Wl,-rpath,/usr/local/ff-petsc/r/lib -L/usr/local/ff-petsc/r/lib -lslepc -I/usr/local/ff-petsc/r/include -DWITH_petsc -Wl,-rpath,/usr/local/ff-petsc/r/lib -L/usr/local/ff-petsc/r/lib -lpetsc -Wl,-rpath,/usr/local/ff-petsc/r/lib -L/usr/local/ff-petsc/r/lib -Wl,-rpath,/usr/lib/x86_64-linux-gnu/openmpi/lib -L/usr/lib/x86_64-linux-gnu/openmpi/lib -Wl,-rpath,/usr/lib/gcc/x86_64-linux-gnu/9 -L/usr/lib/gcc/x86_64-linux-gnu/9 -lHYPRE -lspqr -lumfpack -lklu -lcholmod -lbtf -lccolamd -lcolamd -lcamd -lamd -lsuitesparseconfig -lcmumps -ldmumps -lsmumps -lzmumps -lmumps_common -lpord -lscalapack -lsuperlu -llapack -lblas -lparmmg -lmmg -lmmg3d -lptesmumps -lptscotchparmetis -lptscotch -lptscotcherr -lesmumps -lscotch -lscotcherr -lparmetis -lmetis -ltet -lm -lstdc++ -ldl -lmpi_usempif08 -lmpi_usempi_ignore_tkr -lmpi_mpifh -lmpi -lgfortran -lm -lgfortran -lm -lgcc_s -lquadmath -lpthread -lrt -lquadmath -lstdc++ -ldl -I/usr/local/ff-petsc/r/include -DWITH_blas -llapack -lblas -I/usr/local/ff-petsc/r/include -pthread -L/usr/lib/x86_64-linux-gnu/openmpi/lib -lmpi_cxx -lmpi -I/usr/lib/x86_64-linux-gnu/openmpi/include/openmpi -I/usr/lib/x86_64-linux-gnu/openmpi/include
/usr/bin/mpic++ -c -fPIC -std=c++14 -std=c++14 '-I../seq/include' '-DWITH_slepc' '-I/usr/local/ff-petsc/r/include' '-DWITH_petsc' '-I/usr/local/ff-petsc/r/include' '-DWITH_blas' '-I/usr/local/ff-petsc/r/include' '-I/usr/lib/x86_64-linux-gnu/openmpi/include/openmpi' '-I/usr/lib/x86_64-linux-gnu/openmpi/include' -g -O2 -DNDEBUG -O3 -mtune=generic -std=c++14 -DBAMG_LONG_LONG -DNCHECKPTR -fPIC -I/usr/local/ff-petsc/r/include -I/usr/include/hdf5/serial -I/usr/include 'PETSc.cpp'
Trophime commented 2 years ago

I've installed FreeFEM-4.11-amd64-ubuntu20.04.deb from your gitrepo. You can easily test this. Just start a docker and run:

-- FreeFem++ v4.11 (Fri 08 Apr 2022 01:02:23 PM CEST - git v4.11) file : loadmesh.edp Load: lg_fem lg_mesh lg_mesh3 eigenvalue 1 : load "PETSc" Load error: PETSc fail: dlerror : /usr/local/lib/ff++/4.11/lib/PETSc.so: cannot open shared object file: No such file or directory list prefix: './' '/usr/local/lib/ff++/4.11/lib/' list suffix: '' , '.so' current line = 1 Load error : PETSc line number :1, PETSc error Load error : PETSc line number :1, PETSc code = 2 mpirank: 0

with loadmesh.edp (just change the msh):

load "PETSc" DM dm("cylinder_base.msh"); mesh Th = dm;

plot(Th);

prj- commented 2 years ago

You are using the FreeFem++ binary, not FreeFem++-mpi. This is not expected to work.

Trophime commented 2 years ago

Ok my bad. I close the issue. Sorry for the trouble

prj- commented 2 years ago

No problem, please re-open if this still does not work with FreeFem++-mpi.

Trophime commented 2 years ago

I still have a question regarding the labels retrieved from the mesh. It only loads the BC ids, right? How can I load the volume in 3D or surface in 2D ids?

prj- commented 2 years ago

With a DM? I think this is a pending issue with DMPlex from PETSc. Could you please share a usable .msh and let me know what you'd like to retrieve exactly so that I can give it a go? If some plumbing is missing from within the PETSc plugin, I'll try to add that. If it's a limitation of DMPlex, I'll ask the appropriate people.

Trophime commented 2 years ago

Actually, I would like to import a mesh from gmsh and recover volumes/surfaces and BC ids. I've tried with DM following a discussion on discourse. I've tried to convert the gmsh mesh to gmsh 2 format, to mesh/meshd with Gmsh All tests failed somehow. Next, I've tried meshio to convert msh to mesh, same pb. I'll send a test mesh by mail. Thanks