Gcc 8.2.0 problems with openmp? Just in case

Facing problems to run an openmp fortran program with gfortran 8.2.0 that is shipped with OM LX 4.0 alpha1. This does not happen in OM LX 3.03 with gfortran 7.3 and in RHEL with a compilation of gcc 8.1.
Can’t say this is not caused by a combination of my own mistakes and bug fixes in gcc-gfortran.

Just in case, let me ask if, in OM LX 4.0 alpha1, gcc was build with --disable-libmpx option. This libmpx option is known to cause problems and it is said to be removed from gcc in next releases.

1 Like

gcc for native arch is build with MPX enabled:
checking for libmpx support… yes

You can check spec file for yourself

1 Like

Are there plans to rebuild gcc with disable-libmpx?

1 Like

i do not know what are any drawbacks of building gcc with --disable-libmpx by default
@bero wdyt ?

I checked other distros i.e. Fedora and they build gcc-8.2.x with MPX enabled.

1 Like

In search for the culprit for my problems with segmentation fault and Nan, inf values when running my code compiled with gfortran 8.2.0, given that no problem seems to happen running at OM LX 3.03 and at RHEL with gcc 8.1.X (compiled by my job’s IT people), I’ve found this,

6.23. GCC-9.2.0

where one can read,

–disable-libmpx

This switch tells GCC to not build mpx (Memory Protection Extensions) that can cause problems on some processors. It has been removed from the next version of gcc.

I wonder if this is not a kind of GNU’s itself recommendation for building gcc 8.2.0 …

Fixed gcc is available for cooker.

Not available yet.

I’ve checked and found at least three instances of --disable-libmpx at

gcc/gcc.spec at 7af53f8ad072320df20377d27852bf9c73fa5c17 · OpenMandrivaAssociation/gcc · GitHub

Please, what was changed/fixed?

gcc-8.2.0-6 is available for cooker for all arches.

I already had this version. Anyway, I’ve reinstalled it (dnf reinstall gcc …). And no luck. Still don’t know what can be wrong! Could be my own mistake with openmp rules (most likely), could be some gcc bug since different gcc releases yield different outcomes, and, of course, could be a combination of everything.

Beginning to consider a customized installation of gcc …

News, the binary generated with

gfortran-8.1 -static-libgcc -static-libgfortran in a CENTOs 6.9

works at OM LX 4.0 alpha1.
I would like to try a static compilation with these libraries but couldn’t find

lib64gcc-static

neither at OM LX 4.0 nor in the web. Does this exist somewhere?

I’ve found what was wrong. My stupid mistake was to forget that all dependencies should be compiled with openmp!

I apologize to spend other people’s time with that …

And I would like to thank the help

Good to know things are finally solved.