Skip to content
This repository was archived by the owner on Mar 20, 2023. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions coreneuron/nrniv/output_spikes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,12 @@ void local_spikevec_sort(std::vector<double>& isvect,
#if NRNMPI

void sort_spikes(std::vector<double>& spikevec_time, std::vector<int>& spikevec_gid) {
double lmin_time = *(std::min_element(spikevec_time.begin(), spikevec_time.end()));
double lmax_time = *(std::max_element(spikevec_time.begin(), spikevec_time.end()));
double lmin_time = std::numeric_limits<double>::max();
double lmax_time = std::numeric_limits<double>::min();
if(!spikevec_time.empty()) {
lmin_time = *(std::min_element(spikevec_time.begin(), spikevec_time.end()));
lmax_time = *(std::max_element(spikevec_time.begin(), spikevec_time.end()));
}
double min_time = nrnmpi_dbl_allmin(lmin_time);
double max_time = nrnmpi_dbl_allmax(lmax_time);

Expand Down