rifdock / rifdock

Rifdock Library for Conformational Search
Other
142 stars 40 forks source link

FAILED ASSERTION: resname(ala_rot_) == "ALA" #126

Open bcov77 opened 2 years ago

bcov77 commented 2 years ago

This has something to do with newer GCC compilers (v8+). If someone wants to deep-dive this that would be sick (I'll do it someday). Maybe run valgrind.

The one time we debugged this, we thought it was a compiler issue. We managed to show that at this point in the code, that the < operator between integers was buggy. We thought this was a compiler bug, but my money's on oob memory writing.

srwarner commented 2 years ago

Do you have any additional info on how to reproduce the issue?

bcov77 commented 2 years ago

How to reproduce:

  1. Compile Rifdock/Rosetta with gcc 8+ (I've seen this on 8.X and 9.X)
  2. Get lucky
  3. Run rif_dock_test with standard inputs
  4. During loading of the rotamer library, rifdock will output the error in the Issue title

This is an assertion that basically can't fail. This was more like a debugging assertion. If this triggers, your build is totally messed up somehow. The workaround is to compile with gcc 5 or 6.

blakely3dnm commented 2 years ago

I am seeing this same error. Rifdock and Rosetta were compiled with GCC 8.4.5

bcov77 commented 2 years ago

This error is super common. Likely the largest single thing wrong with the codebase. The way to get around it is to install gcc6 somehow on your system and then do this.

Compiling Rosetta: # ensure that main/source/cmake/build_cxx11_omp only contains CMakeLists.txt and nothing else CXX=/path/to/g++6 CC=/path/to/gcc6 ./ninja_build.py cxx11_omp -t rosetta_scripts -remake

Compiling Rifdock: CXX=/path/to/g++6 CC=/path/to/gcc6

In both cases, you need to make sure that the build directory is completely empty of compile files. Cmake remembers what you said the first time and uses that.

Once cmake starts in both circumstances, you can check if it's building with gcc6 in the initial output to the terminal.

mcuma commented 2 years ago

I just want to say that we are getting this error as well on Rocky Linux 8, which has gcc 8.5.0 as default. It'd be nice to get this fixed so we could use this compiler version rather than stepping down to gcc 6. Thanks.

bcov77 commented 2 years ago

Can someone who is is getting this error simply rerun the command with valgrind?

It would look like this:

valgrind /path/to/rif_dock_test @flags

I want to get this fixed. I'm just ultra-busy atm.

Song-Cao commented 1 year ago

This error is super common. Likely the largest single thing wrong with the codebase. The way to get around it is to install gcc6 somehow on your system and then do this.

Compiling Rosetta: # ensure that main/source/cmake/build_cxx11_omp only contains CMakeLists.txt and nothing else CXX=/path/to/g++6 CC=/path/to/gcc6 ./ninja_build.py cxx11_omp -t rosetta_scripts -remake

Compiling Rifdock: CXX=/path/to/g++6 CC=/path/to/gcc6

In both cases, you need to make sure that the build directory is completely empty of compile files. Cmake remembers what you said the first time and uses that.

Once cmake starts in both circumstances, you can check if it's building with gcc6 in the initial output to the terminal.

Tried GCC-5 and G++-5, still got this error (https://github.com/rifdock/rifdock/issues/141). I followed this guide to compile rosetta and rifdock: https://github.com/rifdock/rifdock/blob/master/help/ubuntu_rifdock_compilation_extra.pdf