Skip to content

Commit

Permalink
Debug extension loading
Browse files Browse the repository at this point in the history
  • Loading branch information
Luthaf committed Apr 11, 2024
1 parent ccc3768 commit 67020b7
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/metatensor/metatensor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,15 +100,21 @@ MetatensorPlumedAction::MetatensorPlumedAction(const ActionOptions& options):
this->parse("EXTENSIONS_DIRECTORY", extensions_directory);

// TEMPORARY BAD CODE, TO BE REMOVED
dlopen(
auto rascaline = dlopen(
(extensions_directory + "/rascaline/lib/librascaline.dylib").c_str(),
RTLD_LOCAL | RTLD_NOW
);
if (rascaline == nullptr) {
std::cerr << "failed to load rascaline: " << dlerror() << std::endl;
}

dlopen(
auto rascaline_torch = dlopen(
(extensions_directory + "/rascaline/torch/lib/librascaline_torch.dylib").c_str(),
RTLD_LOCAL | RTLD_NOW
);
if (rascaline_torch == nullptr) {
std::cerr << "failed to load rascaline_torch: " << dlerror() << std::endl;
}
// END OF TEMPORARY BAD CODE, TO BE REMOVED

// load the model
Expand Down

0 comments on commit 67020b7

Please sign in to comment.