Skip to content
This repository has been archived by the owner on Mar 20, 2023. It is now read-only.

Commit

Permalink
Use the value calculated mindelay by the MPI min reduction (#90)
Browse files Browse the repository at this point in the history
Also remove superfluous mpi wrapper function
  • Loading branch information
ohm314 authored and pramodk committed Jun 5, 2018
1 parent a0a760f commit 02dd866
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 13 deletions.
5 changes: 2 additions & 3 deletions coreneuron/nrniv/netpar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -801,15 +801,14 @@ double set_mindelay(double maxdelay) {

// printf("%d netpar_mindelay local %g now calling nrnmpi_mindelay\n", nrnmpi_myid, mindelay);
// double st = time();
mindelay_ = nrnmpi_mindelay(mindelay);
mindelay_ = nrnmpi_dbl_allmin(mindelay);
// add_wait_time(st);
// printf("%d local min=%g global min=%g\n", nrnmpi_myid, mindelay, mindelay_);
errno = 0;
return mindelay;
#else
mindelay_ = mindelay;
return mindelay;
#endif // NRNMPI
return mindelay_;
}

void BBS_netpar_spanning_statistics(int* nsend, int* nsendmax, int* nrecv, int* nrecv_useful) {
Expand Down
9 changes: 0 additions & 9 deletions coreneuron/nrnmpi/mpispike.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -248,15 +248,6 @@ int nrnmpi_spike_exchange_compressed() {
return ntot;
}

double nrnmpi_mindelay(double m) {
double result;
if (!nrnmpi_use) {
return m;
}
MPI_Allreduce(&m, &result, 1, MPI_DOUBLE, MPI_MIN, nrnmpi_comm);
return result;
}

int nrnmpi_int_allmax(int x) {
int result;
if (nrnmpi_numprocs < 2) {
Expand Down
1 change: 0 additions & 1 deletion coreneuron/nrnmpi/nrnmpidec.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ extern void nrnmpi_check_threading_support();
extern void nrnmpi_spike_initialize(void);
extern int nrnmpi_spike_exchange(void);
extern int nrnmpi_spike_exchange_compressed(void);
extern double nrnmpi_mindelay(double maxdel);
extern int nrnmpi_int_allmax(int i);
extern void nrnmpi_int_gather(int* s, int* r, int cnt, int root);
extern void nrnmpi_int_gatherv(int* s, int scnt, int* r, int* rcnt, int* rdispl, int root);
Expand Down

0 comments on commit 02dd866

Please sign in to comment.