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

Building HOOMD-blue with LLVM #21960

Closed
Crivella opened this issue Dec 3, 2024 · 2 comments
Closed

Building HOOMD-blue with LLVM #21960

Crivella opened this issue Dec 3, 2024 · 2 comments

Comments

@Crivella
Copy link
Contributor

Crivella commented Dec 3, 2024

HOOMD seems to be incompatible with newer version of LLVM (if enabled).

Tested:

  • Modified version of the latest version of HOOMD-blue: HOOMD-blue-4.0.1-foss-2022a.eb changing
    • foss-2022a -> foss-2024a
    • 4.0.1 -> 4.9.1
    • Adding -DENABLE_LLVM to the configopts (via _copts)

Using the new full build of LLVM (in order to have the shared libLLVM.so) from:

Give raise to the error

In file included from /home/crivella/.local/easybuild/build/HOOMDblue/4.9.1/foss-2024a/hoomd-4.9.1/hoomd/hpmc/EvalFactory.h:11,
                from /home/crivella/.local/easybuild/build/HOOMDblue/4.9.1/foss-2024a/hoomd-4.9.1/hoomd/hpmc/PatchEnergyJIT.h:13,
                from /home/crivella/.local/easybuild/build/HOOMDblue/4.9.1/foss-2024a/hoomd-4.9.1/hoomd/hpmc/PatchEnergyJIT.cc:4:
/home/crivella/.local/easybuild/build/HOOMDblue/4.9.1/foss-2024a/hoomd-4.9.1/hoomd/hpmc/KaleidoscopeJIT.h: In member function llvm::Expected<llvm::JITEvaluatedSymbol> llvm::orc::KaleidoscopeJIT::findSymbol(std::string):
/home/crivella/.local/easybuild/build/HOOMDblue/4.9.1/foss-2024a/hoomd-4.9.1/hoomd/hpmc/KaleidoscopeJIT.h:134:26: error: could not convert llvm::orc::ExecutionSession::lookup(llvm::ArrayRef<llvm::orc::JITDylib*>, llvm::orc::SymbolStringPtr, llvm::orc::SymbolState)(llvm::ArrayRef<llvm::orc::JITDylib*>(const std::initializer_list<llvm::orc::JITDylib*>{((llvm::orc::JITDylib* const*)(& llvm::orc::JITDylib* const [1]{(&((llvm::orc::KaleidoscopeJIT*)this)->llvm::orc::KaleidoscopeJIT::mainJD)})), 1}), llvm::orc::MangleAndInterner::operator()(llvm::StringRef)(llvm::StringRef(Name)), llvm::orc::SymbolState::Ready) from Expected<llvm::orc::ExecutorSymbolDef> to Expected<llvm::JITEvaluatedSymbol>
  134 |         return ES->lookup({&mainJD}, Mangle(Name));
      |                ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
      |                          |
      |                          Expected<llvm::orc::ExecutorSymbolDef>

Which seems to be related to https://www.reddit.com/r/LLVM/comments/12kl6xk/cannot_find_executorsymboldef_compile_error/.
From the link i think this means that HOOMD is incompatible with newer version of LLVM (probably >= 17).

I tried to naively patch the files by replacing in hoomd/hpmc/KaleidoscopeJIT.h the following:

  • JITEvaluatedSymbol -> ExecutorSymbolDef
  • JITTargetAddress -> ExecutorAddr

which makes the compilation go further, but then it fails with errors of the type:

invalid cast from type const llvm::orc::ExecutorAddr to type float**

EDIT: Opened a feature-request on hoomd-blue main repo

@joaander
Copy link

joaander commented Dec 3, 2024

HOOMD-blue 5.0.0 removes the LLVM JIT feature. There will be no further updates to 4.9.x.

@Crivella
Copy link
Contributor Author

Crivella commented Dec 3, 2024

Thanks @joaander ! Closing this since this is not supported anymore

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

2 participants