#1099046 openMM: internal compiler error: in vect_get_vec_defs_for_operand, at tree-vect-stmts.cc:1509

Package:
g++-12
Source:
g++-12
Description:
GNU C++ compiler
Submitter:
Tru Huynh
Date:
2025-02-27 18:09:06 UTC
Severity:
normal
#1099046#5
Date:
2025-02-27 15:21:37 UTC
From:
To:
Dear Maintainer,

*** Reporter, please consider answering these questions, where appropriate ***

   * What led up to the situation?
   compiling openMM relesed version 8.2.0 with cuda 12.8 support on
   x86_64
   * What exactly did you do (or not do) that was effective (or
     ineffective)?
https://github.com/openmm/openmm/issues/4813
   * What was the outcome of this action?
   compilation failure
   * What outcome did you expect instead?
   compilation proceed

*** End of the template - remove these template lines ***

#1099046#10
Date:
2025-02-27 17:05:56 UTC
From:
To:
ccSEyJuT.out is attached generated after adding "-freport-bug"
to build/platforms/cuda/sharedTarget/CMakeFiles/OpenMMCUDA.dir/flags.make file

initial value:
CXX_FLAGS = -I/d12/shared/cuda/12.8.0_570.86.10/include -O2 -DNDEBUG -fPIC -msse2 -DLEPTON_USE_JIT -DOPENMM_COMMON_BUILDING_SHARED_LIBRARY -std=gnu++11
changed into:
CXX_FLAGS = -I/d12/shared/cuda/12.8.0_570.86.10/include -O2 -DNDEBUG -fPIC -msse2 -DLEPTON_USE_JIT -DOPENMM_COMMON_BUILDING_SHARED_LIBRARY -std=gnu++11 -freport-bug

```
during GIMPLE pass: vect
/jade/home/tru/build/openmm/openmm-8.2.0/platforms/common/src/CommonKernels.cpp: In member function ‘void OpenMM::Common
CalcGayBerneForceKernel::sortAtoms()’:
/jade/home/tru/build/openmm/openmm-8.2.0/platforms/common/src/CommonKernels.cpp:5375:6: internal compiler error: in vect
_get_vec_defs_for_operand, at tree-vect-stmts.cc:1509
 5375 | void CommonCalcGayBerneForceKernel::sortAtoms() {
      |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
0x1afaeb6 internal_error(char const*, ...)
        ???:0
0x69ec5a fancy_abort(char const*, int, char const*)
        ???:0
0x1abda20 vect_transform_stmt(vec_info*, _stmt_vec_info*, gimple_stmt_iterator*, _slp_tree*, _slp_instance*)
        ???:0
0xfa2dbd vect_transform_loop(_loop_vec_info*, gimple*)
        ???:0
Please submit a full bug report, with preprocessed source.
Please include the complete backtrace with any bug report.
See <file:///usr/share/doc/gcc-12/README.Bugs> for instructions.
Preprocessed source stored into /tmp/ccSEyJuT.out file, please attach this to your bugreport.
```

Other data points:
1) lowering the optimisation from -O3 to -O2 avoids the internal compiler error
2) using gcc-11/g++-11 (with -O3) instead og gcc-12/g++-12 does not cause any issue.

Best regards

Tru

#1099046#15
Date:
2025-02-27 18:07:21 UTC
From:
To:
missing attachement... take 2