Gcc 8.2.0 problems with openmp? Just in case

omlx-4
Tags: #<Tag:0x00007f0e482dacf0>

#1

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.


(Tomasz Paweł Gajc) #2

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

You can check spec file for yourself


#3

Are there plans to rebuild gcc with disable-libmpx?


(Tomasz Paweł Gajc) #4

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.


#5

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,

http://www.linuxfromscratch.org/lfs/view/development/chapter06/gcc.html

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 …


(Tomasz Paweł Gajc) #6

Fixed gcc is available for cooker.


#7

Not available yet.

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

https://github.com/OpenMandrivaAssociation/gcc/blob/7af53f8ad072320df20377d27852bf9c73fa5c17/gcc.spec

Please, what was changed/fixed?


(Tomasz Paweł Gajc) #8

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


#9

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 …


#10

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?


#11

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


(Tomasz Paweł Gajc) #12

Good to know things are finally solved.