-
Notifications
You must be signed in to change notification settings - Fork 118
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
26 changed files
with
453 additions
and
803 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#include <dlfcn.h> | ||
#include <sstream> | ||
#include "../nrnmpi.h" | ||
|
||
// Those functions are part of a mechanism to dynamically load mpi or not | ||
void mpi_manager_t::resolve_symbols(void* handle) { | ||
for (auto* ptr: m_function_ptrs) { | ||
assert(!(*ptr)); | ||
ptr->resolve(handle); | ||
assert(*ptr); | ||
} | ||
} | ||
|
||
void mpi_function_base::resolve(void* handle) { | ||
dlerror(); | ||
void* ptr = dlsym(handle, m_name); | ||
const char* error = dlerror(); | ||
if (error) { | ||
std::ostringstream oss; | ||
oss << "Could not get symbol " << m_name << " from handle " << handle << ": " << error; | ||
throw std::runtime_error(oss.str()); | ||
} | ||
assert(ptr); | ||
m_fptr = ptr; | ||
} |
Oops, something went wrong.