OpenGATE / Gate

Official public repository of Gate
http://www.opengatecollaboration.org
GNU Lesser General Public License v3.0
236 stars 263 forks source link

Problems compiling Gate 9.0 with TORCH option ON #328

Closed ingridvalo closed 4 years ago

ingridvalo commented 4 years ago

Hi Gate users, I'm trying to compile Gate v9.0 using the libtorch library however I have issues with it. Some errors appear as: In function at::LegacyTypeDispatch::initForTensorTypeSet(c10::TensorTypeSet) [clone .isra.618]': Gate_NN_ARF_Actor.cc:(.text+0x899): undefined reference toc10::Error::Error(c10::SourceLocation, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)'

or

GateSourcePhaseSpace.cc:(.text+0x66d7): undefined reference to `c10::Error::Error(c10::SourceLocation, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)'

any ideas about which can be the problem?

Thanks!

djboersma commented 4 years ago

Hi @ingridvalo , Could you tell us what platform you are using? Linux or MacOS, which distribution/release, which version of which compiler (gcc, clang, intel)?

ingridvalo commented 4 years ago

Hi David,

I am using Linux (Ubuntu 18.04). The compiler is gcc version 7.4.0

On Mon, Apr 6, 2020 at 11:20 AM David Boersma notifications@github.com wrote:

Hi @ingridvalo https://github.com/ingridvalo , Could you tell us what platform you are using? Linux or MacOS, which distribution/release, which version of which compiler (gcc, clang, intel)?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/OpenGATE/Gate/issues/328#issuecomment-609860133, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADBEEYADFNLVO6F4JUGZEU3RLHXNXANCNFSM4MCKYBIA .

--

Dr. Ingrid Valencia Lozano

BWH - Dana Farber Cancer Institute

Harvard Medical school

djboersma commented 4 years ago

How did you install LibTorch? I suppose that you followed these instructions: https://opengate.readthedocs.io/en/latest/compilation_instructions.html#libtorch-optional Can you show us the filename of the zip archive that you downloaded and installed? @dsarrut or @tbaudier may also be able to help you. I am very busy this week and may not respond quickly (3 days lag, I'm sorry!).

Mostly this issue is a gate-users mailing list topic, I think, but I wonder if we can make CMakeLists.txt smarter to detect incompatible torch installations, so we can keep the discussion here for now.

dsarrut commented 4 years ago

Do you still have trouble @ingridvalo ?