lich-uct / molpher-lib

C++/Python Library for Systematic Chemical Space Exploration
https://lich-uct.github.io/molpher-lib/
Other
17 stars 7 forks source link

Make sure the library works with the newest versions of dependencies (RDKit 2018.03.2 and TBB 2018.0.4) #5

Closed martin-sicho closed 2 years ago

martin-sicho commented 6 years ago

RDKit 2018.03.2 probably changes the names of the binary library files so the linking code needs to be changed to reflect that.

TBB 2018.0.4 could cause a SEGFAULT for a yet unknown reason in some instances.

martin-sicho commented 6 years ago

Turns out the RDKit library names changed by accident due to a bug.

martin-sicho commented 6 years ago

This issue is partially addressed in the newest development snapshot, but the true solution will take a while.

Especially since the SEGFAULT problem with TBB is hard to reproduce. It only happens with the TBB 2018.0.4 binaries from the tbb and tbb-devel packages in the Anaconda repositiories. Here is a stack trace from a dumped core file during a conda package build:

Reading symbols from /tmp/conda-bld/molpher-lib_1529503856343/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_plac/bin/python...done.

warning: core file may not match specified executable file.
[New LWP 32438]
[New LWP 32434]
[New LWP 32440]
[New LWP 32439]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `/tmp/conda-bld/molpher-lib_1529503856343/_test_env_placehold_placehold_placehol'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  tbb::internal::generic_scheduler::allocate_task (this=this@entry=0x7f3d5b387e00, 
    number_of_bytes=number_of_bytes@entry=8, parent=parent@entry=0x0, 
    context=context@entry=0x7f3d5c7c5c60 <tbb::internal::the_dummy_context>)
    at ../../src/tbb/scheduler.cpp:320
320     ../../src/tbb/scheduler.cpp: No such file or directory.
[Current thread is 1 (Thread 0x7f3d429c9700 (LWP 32438))]
(gdb) bt
#0  tbb::internal::generic_scheduler::allocate_task (this=this@entry=0x7f3d5b387e00, 
    number_of_bytes=number_of_bytes@entry=8, parent=parent@entry=0x0, 
    context=context@entry=0x7f3d5c7c5c60 <tbb::internal::the_dummy_context>)
    at ../../src/tbb/scheduler.cpp:320
#1  0x00007f3d5c5abf2e in tbb::internal::generic_scheduler::generic_scheduler (
    this=this@entry=0x7f3d5b387e00, m=...) at ../../src/tbb/scheduler.cpp:100
#2  0x00007f3d5c5ae0c8 in tbb::internal::custom_scheduler<tbb::internal::IntelSchedulerTraits>::custom_scheduler (m=..., this=0x7f3d5b387e00) at ../../src/tbb/custom_scheduler.h:59
#3  tbb::internal::custom_scheduler<tbb::internal::IntelSchedulerTraits>::allocate_scheduler (m=...)
    at ../../src/tbb/custom_scheduler.h:120
#4  0x00007f3d5c5ac0d2 in tbb::internal::allocate_scheduler (m=...) at ../../src/tbb/scheduler.cpp:42
#5  tbb::internal::generic_scheduler::create_worker (m=..., index=index@entry=1)
    at ../../src/tbb/scheduler.cpp:1147
#6  0x00007f3d5c5a774a in tbb::internal::market::create_one_job (this=0x7f3d5b3a2080)
    at ../../src/tbb/market.cpp:747
#7  0x00007f3d5c5a4029 in tbb::internal::rml::private_worker::run (this=0x7f3d5b1ba100)
    at ../../src/tbb/private_server.cpp:267
#8  0x00007f3d5c5a4299 in tbb::internal::rml::private_worker::thread_routine (arg=<optimized out>)
    at ../../src/tbb/private_server.cpp:223
#9  0x00007f3d638b46ba in start_thread (arg=0x7f3d429c9700) at pthread_create.c:333
#10 0x00007f3d635ea41d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109
(gdb) bt
#0  tbb::internal::generic_scheduler::allocate_task (this=this@entry=0x7f3d5b387e00, 
    number_of_bytes=number_of_bytes@entry=8, parent=parent@entry=0x0, 
    context=context@entry=0x7f3d5c7c5c60 <tbb::internal::the_dummy_context>)
    at ../../src/tbb/scheduler.cpp:320
#1  0x00007f3d5c5abf2e in tbb::internal::generic_scheduler::generic_scheduler (
    this=this@entry=0x7f3d5b387e00, m=...) at ../../src/tbb/scheduler.cpp:100
#2  0x00007f3d5c5ae0c8 in tbb::internal::custom_scheduler<tbb::internal::IntelSchedulerTraits>::custom_scheduler (m=..., this=0x7f3d5b387e00) at ../../src/tbb/custom_scheduler.h:59
#3  tbb::internal::custom_scheduler<tbb::internal::IntelSchedulerTraits>::allocate_scheduler (m=...)
    at ../../src/tbb/custom_scheduler.h:120
#4  0x00007f3d5c5ac0d2 in tbb::internal::allocate_scheduler (m=...) at ../../src/tbb/scheduler.cpp:42
#5  tbb::internal::generic_scheduler::create_worker (m=..., index=index@entry=1)
    at ../../src/tbb/scheduler.cpp:1147
#6  0x00007f3d5c5a774a in tbb::internal::market::create_one_job (this=0x7f3d5b3a2080)
    at ../../src/tbb/market.cpp:747
#7  0x00007f3d5c5a4029 in tbb::internal::rml::private_worker::run (this=0x7f3d5b1ba100)
    at ../../src/tbb/private_server.cpp:267
#8  0x00007f3d5c5a4299 in tbb::internal::rml::private_worker::thread_routine (arg=<optimized out>)
    at ../../src/tbb/private_server.cpp:223
#9  0x00007f3d638b46ba in start_thread (arg=0x7f3d429c9700) at pthread_create.c:333
#10 0x00007f3d635ea41d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

This problem does not occur with binaries obtained from the official TBB GitHub repo.