ParMmg icon indicating copy to clipboard operation
ParMmg copied to clipboard

Compilation issue

Open SeiDPierre opened this issue 2 years ago • 4 comments

Hi everyone, I have trouble compiling ParMmg on my computer. Before compiling, both Metis and Mmg were already installed. I followed the instructions you provided but got some issues: The first error message I got was : metis.h could not be found. Though I previously set the path with the command: cmake -DDOWNLOAD_METIS=OFF -DMETIS_DIR=/home/pclouzet/local .. So I manually edited the file here: CMakeFiles/libparmmg_a.dir/flags.make and added a -I/home/pclouzet/local which solved the error message.

The second error message I got was : mmg3d.h could not be found. In deed I don't have such file in mmg directory but have libmmg3d.h. So I though it was a typo and modified #include "mmg3d.h" to #include "libmmg3d.h" in the file ParMmg/src/parmmg.h However that last step lead to a lot of warning messages ending with error of compilation.

This last error message (see attached file) is very generic and dont provide any hint on what went wrong so I'm sharing this with the community!

My setup: cmake version 3.22.1 gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0 mmg 5.7.0 metis latest version

Attached are the warning messages I got compilation.log

Please do tell if you need any other information! Thanks in advance Pierre

SeiDPierre avatar Aug 30 '23 12:08 SeiDPierre

For whoever will continue to debug it: we checked together that compilation with -DDOWNLOAD_MMG=OFF still works with the old Mmg release https://github.com/MmgTools/mmg/releases/tag/v5.6.0 on Parmmg 2abacd7d7babf3ebe99888e7d8803006d7ef1cc4 (latest master). It could be worth investigating the changes in Mmg CMakeList.txt from v5.6.0 to v5.7.1.

Thanks, Luca

lcirrottola avatar Sep 01 '23 14:09 lcirrottola

I tried with the downloading option and it failed too. In ParMmg/src/parmmg.h the compiler complained that many functions were not declared: MMG5_FMT_MeditASCII, MMG5_FMT_MeditBinary, MMG5_FMT_GmshASCII, MMG5_FMT_GmshBinary, MMG5_FMT_VtkPvtp, MMG5_FMT_VtkPvtu, MMG5_FMT_VtkVtu, MMG5_FMT_VtkVtp, MMG5_FMT_VtkVtk, MMG5_FMT_Tetgen and many other starting by MMG5_FMT. In the current mmg version (5.7.1) they are present in libmmgtype.h. It's not the case when you the use the download option of ParMmg. To solve this, I added: #include "mmgcommon.h" in parmmg.h Finally, MMG5_idir is missing too, I added : #include "mmg3d.h" in parmmg.h and ParMmmg successfully compiled.

SeiDPierre avatar Sep 06 '23 13:09 SeiDPierre

Hello Pierre, As a follow-up of our "offline" conversation, I write down here too that since the ParMmg-Mmg coupling goes quite further than just using the Mmg API, support of Mmg into ParMmg is guaranteed only for the Mmg commit used in the CMakeLists.txt here https://github.com/MmgTools/ParMmg/blob/2abacd7d7babf3ebe99888e7d8803006d7ef1cc4/CMakeLists.txt#L283 which is now Mmg v5.6.0. Since Mmg v5.7.0 introduced some changes in header files, it is possible that some work will be needed to make ParMmg support it. Please do not hesitate to post here any other problems in compiling with Mmg v5.6.0! I will probably open another post for the v5.7.0 support (or a pull request, when I will find some time to test).

Cheers, Luca

lcirrottola avatar Sep 24 '23 17:09 lcirrottola

Hi Luca, Thanks! I switched to 5.6.0 and it compiled just fine!

SeiDPierre avatar Sep 25 '23 10:09 SeiDPierre