Skip to content

Conversation

@furstj
Copy link
Contributor

@furstj furstj commented Nov 27, 2019

(created using eb --new-pr)

@furstj furstj changed the title {cae}[foss/2019b] OpenFOAM v7 {cae}[foss/2019b] OpenFOAM 7 Nov 27, 2019
@boegel
Copy link
Member

boegel commented Nov 27, 2019

Test report by @boegel
FAILED
Build succeeded for 0 out of 1 (1 easyconfigs in this PR)
node3153.skitty.os - Linux centos linux 7.7.1908, Intel(R) Xeon(R) Gold 6140 CPU @ 2.30GHz, Python 3.6.8
See https://gist.github.com/35b0bf38c96af2a155d57726e438ab56 for a full test report.

@boegel boegel added the update label Nov 27, 2019
@boegel boegel added this to the 4.x milestone Nov 27, 2019
@lexming
Copy link
Contributor

lexming commented Nov 28, 2019

Test report by @lexming
FAILED
Build succeeded for 0 out of 1 (1 easyconfigs in this PR)
login2.cerberus.os - Linux centos linux 7.6.1810, Intel(R) Xeon(R) Gold 6126 CPU @ 2.60GHz, Python 2.7.5
See https://gist.github.com/13f5a8e12d1e4e2988449f5cd38a5067 for a full test report.

@lexming
Copy link
Contributor

lexming commented Nov 28, 2019

My failed test seems to be related to https://bugs.openfoam.org/view.php?id=3303 and the changes in OpenFOAM/OpenFOAM-7@9980357

@furstj
Copy link
Contributor Author

furstj commented Nov 28, 2019

@lexming it seems that OF7 already includes changes related to OF bug no. 3301. Nevertheless, I inclded also a patch related to OF bug 3303 (bashrc, wclean, wrmdep).

@boegel
Copy link
Member

boegel commented Nov 28, 2019

Test report by @boegel
SUCCESS
Build succeeded for 1 out of 1 (1 easyconfigs in this PR)
node2470.golett.os - Linux centos linux 7.7.1908, Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz, Python 2.7.5
See https://gist.github.com/8478fa351f2368ee228f72f446f30756 for a full test report.

@boegel
Copy link
Member

boegel commented Nov 28, 2019

@lexming Can you also re-test this PR?

@boegel
Copy link
Member

boegel commented Nov 28, 2019

Test report by @boegel
FAILED
Build succeeded for 0 out of 1 (1 easyconfigs in this PR)
generoso-2 - Linux centos linux 7.6.1810, Intel(R) Xeon(R) CPU E5-2660 v4 @ 2.00GHz, Python 3.6.8
See https://gist.github.com/04f6cd66fb6e5506ef7eb2a26d94c568 for a full test report.

@boegel
Copy link
Member

boegel commented Nov 29, 2019

@furstj Any idea on this? Looks related to Mesa, which provides GL/gl.h, not sure why it expects it to be in the libdrm install dir?

CMake Error at /work/maintainers/CO7/broadwell/software/Qt5/5.13.1-GCCcore-8.3.0/lib/cmake/Qt5Gui/Qt5GuiConfigExtras.cmake:9 (message):
  Failed to find "GL/gl.h" in
  "/work/maintainers/CO7/broadwell/software/libdrm/2.4.99-GCCcore-8.3.0/include/libdrm".
Call Stack (most recent call first):
  /work/maintainers/CO7/broadwell/software/Qt5/5.13.1-GCCcore-8.3.0/lib/cmake/Qt5Gui/Qt5GuiConfig.cmake:187 (include)
  /work/maintainers/CO7/broadwell/software/Qt5/5.13.1-GCCcore-8.3.0/lib/cmake/Qt5Widgets/Qt5WidgetsConfig.cmake:100 (find_package)
  /work/maintainers/CO7/broadwell/software/Qt5/5.13.1-GCCcore-8.3.0/lib/cmake/Qt5/Qt5Config.cmake:28 (find_package)
  /work/maintainers/CO7/broadwell/software/ParaView/5.6.2-foss-2019b-Python-3.7.4-mpi/lib/cmake/paraview-5.6/ParaViewQt.cmake:71 (find_package)
  /work/maintainers/CO7/broadwell/software/ParaView/5.6.2-foss-2019b-Python-3.7.4-mpi/lib/cmake/paraview-5.6/Modules/pqApplicationComponents.cmake:12 (pv_find_package_qt)
  /work/maintainers/CO7/broadwell/software/ParaView/5.6.2-foss-2019b-Python-3.7.4-mpi/lib/cmake/paraview-5.6/vtkModuleAPI.cmake:45 (include)
  /work/maintainers/CO7/broadwell/software/ParaView/5.6.2-foss-2019b-Python-3.7.4-mpi/lib/cmake/paraview-5.6/vtkModuleAPI.cmake:15 (vtk_module_load)
  /work/maintainers/CO7/broadwell/software/ParaView/5.6.2-foss-2019b-Python-3.7.4-mpi/lib/cmake/paraview-5.6/vtkModuleAPI.cmake:152 (_vtk_module_config_recurse)
  /work/maintainers/CO7/broadwell/software/ParaView/5.6.2-foss-2019b-Python-3.7.4-mpi/lib/cmake/paraview-5.6/VTKConfig.cmake:143 (vtk_module_config)
  /work/maintainers/CO7/broadwell/software/ParaView/5.6.2-foss-2019b-Python-3.7.4-mpi/lib/cmake/paraview-5.6/ParaViewConfig.cmake:75 (include)
  CMakeLists.txt:4 (FIND_PACKAGE)

@boegel
Copy link
Member

boegel commented Nov 29, 2019

Test report by @boegel
SUCCESS
Build succeeded for 1 out of 1 (1 easyconfigs in this PR)
node3169.skitty.os - Linux centos linux 7.7.1908, Intel(R) Xeon(R) Gold 6140 CPU @ 2.30GHz, Python 3.6.8
See https://gist.github.com/be47f02ecd17a33ceb9870604bd4d7d9 for a full test report.

@furstj
Copy link
Contributor Author

furstj commented Nov 29, 2019

@boegel I have no idea why it failed due to GL/gl.h. It compiles on my system without problems and you were able to compile it to in your last test. Interesting is that Qt or ParaView compile well (and both use OpenGL too). Do you have any idea wht is the difference between your systems or build environments at node3169.skitty.os and generoso-2?

My latest version uses several patches for OpenFOAM build system (wmake) which are connected to problems with compiling in directories with symlinks. Do you mean that there is any difference between generoso-2 and node3169 related to symlinks?

@lexming
Copy link
Contributor

lexming commented Nov 29, 2019

@furstj yep, I also saw that some patches for OF bug 3303 are already merged in version 7 and it seems that the expansion of $WM_PROJECT_DIR is the intended behavior moving forward. So I took a different approach to solve this issue and updated the easyblock for OpenFOAM to expand $FOAM_INST_DIR (and $WM_PROJECT_DIR) from version 7 onward.

My changes are in lexming/easybuild-easyblocks@a6292b3

I would say that maintaining the code in the easyblock might be easier than having an additional patch, but honestly, I'm not familiar with the development of OpenFOAM, so I'm not sure which solution is best moving forward. Let me know what you think. I'll only open a PR in easybuild-easyblocks, if you and @boegel prefer that.

@lexming
Copy link
Contributor

lexming commented Nov 29, 2019

Test report by @lexming
SUCCESS
Build succeeded for 1 out of 1 (1 easyconfigs in this PR)
login2.cerberus.os - Linux centos linux 7.6.1810, Intel(R) Xeon(R) Gold 6126 CPU @ 2.60GHz, Python 2.7.5
See https://gist.github.com/777b53a22981e6f75d95d9cd4ac7296e for a full test report.

@lexming
Copy link
Contributor

lexming commented Nov 29, 2019

The previous test report is done with this PR for OpenFOAM-7 and the easyblock for OpenFOAM in current develop branch.

@boegel
Copy link
Member

boegel commented Nov 29, 2019

@furstj On all systems I tested except generoso we have mesa-libGL-devel installed in the OS, which provides /usr/include/GL/gl.h.
mesa-libGL-devel is not there on generoso (only mesa-libGL), so GL/gl.h can't be found in the OS on that system.

@boegel
Copy link
Member

boegel commented Nov 29, 2019

@furstj Can you open an issue on that problem?

I don't think it should block this PR (since it's not specific to this particular OpenFOAM version, I think), but it would be nice to get it fixed (and not having an open issue for it means we'll forget about it).

@akesandgren
Copy link
Contributor

Why is OpenFOAM pulling in MESA in the first place? Did they add a GUI?

@boegel
Copy link
Member

boegel commented Nov 29, 2019

@akesandgren As a dep for ParaView, which is a dep for OpenFOAM (for paraFoam, I think)

@furstj
Copy link
Contributor Author

furstj commented Nov 29, 2019

@boegel I will try to compile this EB on a machine without mesa-devel package and we will see.

@akesandgren OF compiles also some plugins to ParaView (e.g. specific openfoam readers). I guess that it needs whole ParaView stack in order to compile these plugins (i.e. ParaView, Qt, Mesa, ...)

@lexming I agree with you that corrected easyblock is much better solution than a mega-patch. However I think that the problem is in OpenFOAM build scripts (I mean in wmake) and it will hurt also all non-easybuild OpenFoamers. Moreover, patches for OpenFOAM 3303 bug are already included in OpenFOAM-dev version, so the current EB patch for 3303 is only temporary solution. I hope that the OpenFOAM-8 (when it will be released) will solve the problem.
Therefore my preference is to use ugly patch for OF7 and to leave easyblock untouched.

@lexming
Copy link
Contributor

lexming commented Dec 2, 2019

@furstj if this patchset is already part of OpenFOAM-dev, then having it included in OF7 is indeed the best solution.

@furstj
Copy link
Contributor Author

furstj commented Dec 2, 2019

@boegel I tried a compilation on a system without mesa-devel and it failed with missing GL/gl.h too. After some analysis I found that the problem is quite complicated and it probably goes through Qt5 down to pkg-config. The "pkg-config --cflags gl" returns wrong include path! It then goes to Qt5 (it can be found in Qt5GuiConfigExtras.cmake) and finally breaks the OpenFOAM compilation.

It is very interesting that the pkg-config from OpenSUSE Leap distribution reports also wrong path with libdrm and the Qt5GuiConfigExtras.cmake from standard distribution contains the wrong path too.

There are several possibilities for dealing with this issue:

  1. one can replace the wrong path in Qt5GuiConfigExtras.cmake using a postinstallcmd in Qt5 easyconfig (I have done this on my computer and it seems to work - I was able to compile ParaView and OpenFOAM)

  2. one can patch OpenFOAM's compilation scripts in order to look for GL/gl.h in correct places (I didn't try it yet but I hope that it should be possible)

  3. one can correct the pkg-config (or at least Mesa pkg-config) in order to give right answer to "--cflags gl"

  4. put "mesa-devel" in osdependencies for OpenFOAM

Under my opinion the least distracting is the option 1. It is sufficient to recompile Qt5 and that's all.
The second option isolates the changes to OpenFOAM package, so it does not solve the problem for other packages using Qt5.
The option 3 is very dangerous. There are plenty of packages depending on pkg-config. So any change in pkg-config could break a tons of software packages.
The option 4 is safe but we then use gl.h from different mesa version. What is your opinion?

@akesandgren
Copy link
Contributor

Note that pkg-config --cflags gl returns the wrong include path in Ubuntu too, so this is not a EasyBuild specific problem.

@akesandgren
Copy link
Contributor

This looks more like a bug in how pkg-config works to me.

@akesandgren
Copy link
Contributor

The gl.pc pkgconfig file (from both Ubuntu and EasyBuild) is technically correct. But pkg-config is not returning what you'd expect.

Try

pkg-config --debug --cflags gl 2>&1 | less

And look at what it really does...

@akesandgren
Copy link
Contributor

Actually, this is a bug in pkg-config 0.29.2...
0.29.1 returns the correct answers

I'll try to chase it down

@akesandgren
Copy link
Contributor

I'll have to do this in our cleanroom setup to double check.

@akesandgren
Copy link
Contributor

Hmmm, my cleanroom install do fail on GL/gl.h

@furstj
Copy link
Contributor Author

furstj commented Dec 3, 2019

@akesandgren Yes, exactly what happens to me and boegel. It fails when there is no /usr/include/GL/gl.h.

I did try also OpenFOAM-v1906 and it compiles fine. Therefore it should be possible to patch OpenFOAM-7 too. The question is then if I should modify OpenFOAM-7 easyconfig letting Qt intact, or if (me someone else?) will modify Qt in order to replace librm path by path to mesa. Both options are feasible. What is your opinion?

@boegel
Copy link
Member

boegel commented Dec 3, 2019

It's still not clear to me where the bug/breakage is actually taking place...

Is the Qt5GuiConfigExtras.cmake in the Qt5 installation buggy, or is OpenFOAM 7 making incorrect assumptions somewhere?
A clear answer to that question could indicate the right place to fix the issue, I think...

Also note that OpenFOAM-6-foss-2018b.eb built fine on the exact same system (without GL/gl.h available in the OS), not sure if that helps at all to pinpoint the problem...

@akesandgren
Copy link
Contributor

Something in either Qt5 or OpenFOAM has to be setting some variable that forces find_path to NOT look in CMAKE_INCLUDE_DIRS, or unsetting CMAKE_INCLUDE_DIRS.

@akesandgren
Copy link
Contributor

I'll be chasing this down (I hope) so hang in there...

@furstj
Copy link
Contributor Author

furstj commented Dec 3, 2019

I'm able to patch OF7 compilation now. If we replace

cmake ../..

by

cmake -D_qt5gui_OPENGL_INCLUDE_DIR=$EBROOTMESA/include ../..

in applications/utilities/postProcessing/graphics/PVReaders/Allwmake, the OF compiles.

@akesandgren
Copy link
Contributor

akesandgren commented Dec 4, 2019

Yeah, the reason it doesn't work as we expected it to, is that OpenFOAM is not using the cmakemake easyblock. That's where we are setting CMAKE_INCLUDE_PATH=paths(CPPFLAGS)+CPATH.

So there is one fairly simple way out and that is to set CMAKE_INCLUDE_PATH the same way we do in cmakemake.py in the OpenFOAM easyblock. Or we could let openfoam.py inherit cmakemake.
We should probably make sure CMAKE_C_COMPILER etc are also correctly set in openfoam.py...

@akesandgren
Copy link
Contributor

I have a potential fix involving cmakemake.py and openfoam.py that fixes this in a slightly more generic way.

@boegel
Copy link
Member

boegel commented Dec 4, 2019

Test report by @boegel
SUCCESS
Build succeeded for 1 out of 1 (1 easyconfigs in this PR)
generoso-2 - Linux centos linux 7.6.1810, Intel(R) Xeon(R) CPU E5-2660 v4 @ 2.00GHz, Python 3.6.8
See https://gist.github.com/9d018e73f209b3e13f764bd8396fc5b3 for a full test report.

@boegel
Copy link
Member

boegel commented Dec 4, 2019

Test report on generoso was on top of easybuilders/easybuild-easyblocks#1869... 👍

@akesandgren
Copy link
Contributor

with or without the patch to work around the GL/gl.h problem? I.e. with or without 0efd968

@boegel
Copy link
Member

boegel commented Dec 4, 2019

with or without the patch to work around the GL/gl.h problem? I.e. with or without 0efd968

Test report was with the last commit included (so not really testing easybuilders/easybuild-easyblocks#1869 I guess).

But we get another opportunity for that in #9440...

@boegel
Copy link
Member

boegel commented Dec 4, 2019

Test report by @boegel
SUCCESS
Build succeeded for 1 out of 1 (1 easyconfigs in this PR)
node3109.skitty.os - Linux centos linux 7.7.1908, Intel(R) Xeon(R) Gold 6140 CPU @ 2.30GHz, Python 3.6.8
See https://gist.github.com/d1482fc927ce2465fe187d94c7afff1b for a full test report.

@boegel
Copy link
Member

boegel commented Dec 4, 2019

Test report by @boegel
SUCCESS
Build succeeded for 1 out of 1 (1 easyconfigs in this PR)
node2704.swalot.os - Linux centos linux 7.7.1908, Intel(R) Xeon(R) CPU E5-2660 v3 @ 2.60GHz, Python 2.7.5
See https://gist.github.com/ba07928db1cf0e2ff1c40e2788e9d6d0 for a full test report.

@akesandgren
Copy link
Contributor

@furstj with the updated easyblock for cmakemake and openfoam in easybuilders/easybuild-easyblocks#1869 you can remove the patch that sets
-D_qt5gui_OPENGL_INCLUDE_DIR=$EBROOTMESA/include

Although they did not make it into EB 4.1.0

@furstj
Copy link
Contributor Author

furstj commented Dec 5, 2019

@akesandgren I have just tested easybuilders/easybuild-easyblocks#1869 without -D_qt5.... and it works. Next commit removes the -D_qt5gui... Thanx a lot for more systematic solution.

Copy link
Member

@boegel boegel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@lexming
Copy link
Contributor

lexming commented Dec 5, 2019

Test report by @lexming
SUCCESS
Build succeeded for 1 out of 1 (1 easyconfigs in this PR)
login2.cerberus.os - Linux centos linux 7.6.1810, Intel(R) Xeon(R) Gold 6126 CPU @ 2.60GHz, Python 2.7.5
See https://gist.github.com/7f37148f74e7d4b53b33e092d565c286 for a full test report.

@lexming
Copy link
Contributor

lexming commented Dec 5, 2019

Tested on top of easybuilders/easybuild-easyblocks#1869

@boegel
Copy link
Member

boegel commented Dec 5, 2019

Test report by @boegel
SUCCESS
Build succeeded for 1 out of 1 (1 easyconfigs in this PR)
generoso-1 - Linux centos linux 7.6.1810, Intel(R) Xeon(R) CPU E5-2660 v4 @ 2.00GHz, Python 3.6.8
See https://gist.github.com/086f5b2515fa992d61390e8e560db30c for a full test report.

@boegel
Copy link
Member

boegel commented Dec 5, 2019

Test report by @boegel
SUCCESS
Build succeeded for 1 out of 1 (1 easyconfigs in this PR)
node3112.skitty.os - Linux centos linux 7.7.1908, Intel(R) Xeon(R) Gold 6140 CPU @ 2.30GHz, Python 3.6.8
See https://gist.github.com/4afdaccb9453ae7b8f7e4526c9e224f0 for a full test report.

@boegel
Copy link
Member

boegel commented Dec 5, 2019

Going in, thanks @furstj!

@boegel boegel merged commit 6429def into easybuilders:develop Dec 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants