Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move to gcc10 as baseline compiler (OMP build error on ggttgg with gcc9.2) #269

Closed
valassi opened this issue Oct 20, 2021 · 5 comments
Closed
Assignees

Comments

@valassi
Copy link
Member

valassi commented Oct 20, 2021

While working on epochX4 PR #267 I got a build error for ggttgg using gcc9.2

ccache /cvmfs/sft.cern.ch/lcg/releases/gcc/9.2.0-afc57/x86_64-centos7/bin/g++  -O3  -std=c++17 -I. -I../../src -I../../../../../tools -DUSE_NVTX -Wall -Wshadow -Wextra -fopenmp -ffast-math   -DMGONGPU_FPTYPE_DOUBLE -DMGONGPU_CURAND_ONDEVICE -I/usr/local/cuda-11.4/include/ -c CPPProcess.cc -o CPPProcess.o
CPPProcess.cc: In function ‘void Proc::calculate_wavefunctions(int, const fptype_sv*, fptype_sv*, int)’:
CPPProcess.cc:1866:24: error: ‘*.LC0’ not specified in enclosing ‘parallel’
 1866 |       constexpr fptype cf[ncolor][ncolor] = {
      |                        ^~
CPPProcess.cc:108:9: error: enclosing ‘parallel’
  108 | #pragma omp parallel for default(none) shared(allmomenta,allMEs,cHel,cIPC,cIPD,ihel,npagV) private (amp_sv,w_sv,jamp_sv)
      |         ^~~
make: *** [CPPProcess.o] Error 1

It appears that this is a gcc9 error
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91920
The bug report mentions that this is fixed in gcc10 and backported to gcc9.3.

Indeed I tested gcc10.2 and the issue seems gone, I no longer get the build error above.

It is probably a good idea to upgrade my baseline compiler anyway (even for AVX512 issue #173). I am using cuda 11.4 and I think that gcc11 is no longer supported by it. I will try to upgrade to the latest gcc10 I have available (gcc10.3) and check that I get no performance hit.

@valassi valassi self-assigned this Oct 20, 2021
@valassi
Copy link
Member Author

valassi commented Oct 20, 2021

Note also that only gcc10 includes the lto-dump tool, useful for LTO studies issue #229

@valassi
Copy link
Member Author

valassi commented Oct 20, 2021

I had noted somewhere (in commit log 6ff529c and in my private bashMG.sh) that gcc10.3 was giving issues (a segmentation fault?) with cuda 10.4, but presently I see no such issue. I will move to gcc10.3.

valassi added a commit to valassi/madgraph4gpu that referenced this issue Oct 20, 2021
valassi added a commit to valassi/madgraph4gpu that referenced this issue Oct 20, 2021
…P issue madgraph5#269) - ~unchanged perf, looks ok

(Note: I had made a note somwehere of a segmentation fault with gcc10.3 and cuda 11.4? but all looks ok...)
valassi added a commit to valassi/madgraph4gpu that referenced this issue Oct 20, 2021
valassi added a commit to valassi/madgraph4gpu that referenced this issue Oct 20, 2021
@valassi
Copy link
Member Author

valassi commented Oct 20, 2021

Using gcc10.3 I see no real performance benefit on the default "no inline" build, but I see a 10% gain in the "aggressive inlining" mode (#229)...

@valassi
Copy link
Member Author

valassi commented Oct 20, 2021

Ok this is now done - closing it.

I am using

. /cvmfs/sft.cern.ch/lcg/releases/gcc/10.3.0/x86_64-centos7/setup.sh

I have updated all logs to use gcc10.3 as new baseline

The code now builds AND REQUIRES gcc10 (or at least, it will not build on gcc9.2 due to the OMP bug).

Closing

@valassi valassi closed this as completed Oct 20, 2021
valassi added a commit to valassi/madgraph4gpu that referenced this issue Oct 27, 2021
valassi added a commit to valassi/madgraph4gpu that referenced this issue Oct 29, 2021
…ttgg

- (temporarely?) reenable gcc9 builds without OMP, issue madgraph5#269
- export OMPFLAGS from Subprocess/Makefile to src/Makefile, even if not really needed in src
- remove LIBFLAGS in src/Makefile
- remove $(MGONGPU_CONFIG) from src/Makefile
- remove unnecessary CXX redefinition
- reorder some lines and document them
- improve info messages about USEBUILDDIR
- move from c++14 to c++17 also in cuda as done for c++
@valassi
Copy link
Member Author

valassi commented Oct 31, 2021

Note that because of the issues discussed in #277, #281, #282, I have downgraded back from cuda 11.4 to cuda 11.1 as baseline. Unlike cuda 11.0, this allows using gcc10, but I am using now gcc10.2 (as my cvmfs 10.3 has some issues). I am using c++17 in gcc and c++14 in cuda.

hageboeck pushed a commit to hageboeck/madgraph4gpu that referenced this issue Nov 12, 2021
hageboeck pushed a commit to hageboeck/madgraph4gpu that referenced this issue Nov 12, 2021
…ttgg

- (temporarely?) reenable gcc9 builds without OMP, issue madgraph5#269
- export OMPFLAGS from Subprocess/Makefile to src/Makefile, even if not really needed in src
- remove LIBFLAGS in src/Makefile
- remove $(MGONGPU_CONFIG) from src/Makefile
- remove unnecessary CXX redefinition
- reorder some lines and document them
- improve info messages about USEBUILDDIR
- move from c++14 to c++17 also in cuda as done for c++
valassi added a commit to valassi/madgraph4gpu that referenced this issue Jan 26, 2022
valassi added a commit to mg5amcnlo/mg5amcnlo_cudacpp that referenced this issue Aug 16, 2023
…ttgg

- (temporarely?) reenable gcc9 builds without OMP, issue madgraph5/madgraph4gpu#269
- export OMPFLAGS from Subprocess/Makefile to src/Makefile, even if not really needed in src
- remove LIBFLAGS in src/Makefile
- remove $(MGONGPU_CONFIG) from src/Makefile
- remove unnecessary CXX redefinition
- reorder some lines and document them
- improve info messages about USEBUILDDIR
- move from c++14 to c++17 also in cuda as done for c++
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant