Skip to content

Commit

Permalink
Merge branch 'master' into cornu/split_sparse13
Browse files Browse the repository at this point in the history
  • Loading branch information
alkino authored Aug 15, 2023
2 parents d1c966b + 8616d59 commit db948f1
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions src/ivoc/ivocmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ extern int nrn_is_python_extension;
extern void hoc_nrnmpi_init();
#if NRNMPI_DYNAMICLOAD
extern void nrnmpi_stubs();
extern std::string nrnmpi_load(int is_python);
extern std::string nrnmpi_load();
#endif

// some things are defined in libraries earlier than they are used so...
Expand Down Expand Up @@ -329,7 +329,7 @@ void hoc_nrnmpi_init() {
if (!nrnmpi_use) {
#if NRNMPI_DYNAMICLOAD
nrnmpi_stubs();
auto const pmes = nrnmpi_load(1);
auto const pmes = nrnmpi_load();
if (!pmes.empty()) {
std::cout << pmes << std::endl;
}
Expand Down
6 changes: 3 additions & 3 deletions src/ivoc/nrnmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ extern int nrn_main_launch;
extern int nrn_noauto_dlopen_nrnmech;
#if NRNMPI_DYNAMICLOAD
void nrnmpi_stubs();
void nrnmpi_load_or_exit(bool is_python);
void nrnmpi_load_or_exit();
#if NRN_MUSIC
void nrnmusic_load();
#endif // NRN_MUSIC
Expand Down Expand Up @@ -39,7 +39,7 @@ printf("argv[%d]=|%s|\n", i, argv[i]);
bool mpi_loaded = false;
for (int i = 0; i < argc; ++i) {
if (strcmp("-mpi", argv[i]) == 0) {
nrnmpi_load_or_exit(false);
nrnmpi_load_or_exit();
mpi_loaded = true;
break;
}
Expand All @@ -65,7 +65,7 @@ printf("argv[%d]=|%s|\n", i, argv[i]);
}
if (load_music) {
if (!mpi_loaded) {
nrnmpi_load_or_exit(false);
nrnmpi_load_or_exit();
}
nrnmusic_load();
}
Expand Down
6 changes: 3 additions & 3 deletions src/nrnmpi/nrnmpi_dynam.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ static void* load_nrnmpi(const char* name, std::string& mes) {
return handle;
}

std::string nrnmpi_load(int is_python) {
std::string nrnmpi_load() {
std::string pmes;
void* handle = nullptr;
// If libmpi already in memory, find name and dlopen that.
Expand Down Expand Up @@ -255,8 +255,8 @@ std::string nrnmpi_load(int is_python) {
// nrnmpi_load cannot safely be called from nrnmpi.cpp because of pre/post-C++11
// ABI compatibility issues with std::string. See
// https://github.com/neuronsimulator/nrn/issues/1963 for more information.
void nrnmpi_load_or_exit(bool is_python) {
auto const err = nrnmpi_load(is_python);
void nrnmpi_load_or_exit() {
auto const err = nrnmpi_load();
if (!err.empty()) {
std::cout << err << std::endl;
std::exit(1);
Expand Down
4 changes: 2 additions & 2 deletions src/nrnpython/inithoc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ extern PyObject* nrnpy_hoc();

#if NRNMPI_DYNAMICLOAD
extern void nrnmpi_stubs();
extern std::string nrnmpi_load(int is_python);
extern std::string nrnmpi_load();
#endif

#if NRN_ENABLE_THREADS
Expand Down Expand Up @@ -255,7 +255,7 @@ extern "C" PyObject* PyInit_hoc() {
libnrnmpi_is_loaded = 0;
}
if (libnrnmpi_is_loaded) {
pmes = nrnmpi_load(1);
pmes = nrnmpi_load();
if (!pmes.empty() && env_mpi == NULL) {
// common case on MAC distribution is no NEURON_INIT_MPI and
// no MPI installed (so nrnmpi_load fails)
Expand Down

0 comments on commit db948f1

Please sign in to comment.