@@ -64,10 +64,10 @@ void spikevec_unlock() {
6464 mut.unlock ();
6565}
6666
67- void local_spikevec_sort (std::vector<double >& isvect,
68- std::vector<int >& isvecg,
69- std::vector<double >& osvect,
70- std::vector<int >& osvecg) {
67+ static void local_spikevec_sort (std::vector<double >& isvect,
68+ std::vector<int >& isvecg,
69+ std::vector<double >& osvect,
70+ std::vector<int >& osvecg) {
7171 osvect.resize (isvect.size ());
7272 osvecg.resize (isvecg.size ());
7373 // first build a permutation vector
@@ -92,7 +92,7 @@ void local_spikevec_sort(std::vector<double>& isvect,
9292
9393#if NRNMPI
9494
95- void sort_spikes (std::vector<double >& spikevec_time, std::vector<int >& spikevec_gid) {
95+ static void sort_spikes (std::vector<double >& spikevec_time, std::vector<int >& spikevec_gid) {
9696 double lmin_time = std::numeric_limits<double >::max ();
9797 double lmax_time = std::numeric_limits<double >::min ();
9898 if (!spikevec_time.empty ()) {
@@ -154,7 +154,7 @@ void sort_spikes(std::vector<double>& spikevec_time, std::vector<int>& spikevec_
154154/* * Split spikevec_time and spikevec_gid by populations
155155 * Add spike data with population name and gid offset tolibsonatareport API
156156 */
157- void output_spike_populations (
157+ static void output_spike_populations (
158158 const std::vector<std::pair<std::string, int >>& population_name_offset) {
159159 // Write spikes with default population name and offset
160160 if (population_name_offset.empty ()) {
@@ -198,8 +198,9 @@ void output_spike_populations(
198198 * \todo : MPI related code should be factored into nrnmpi.c
199199 * Check spike record length which is set to 64 chars
200200 */
201- void output_spikes_parallel (
201+ static void output_spikes_parallel (
202202 const char * outpath,
203+ const char * filename,
203204 const std::vector<std::pair<std::string, int >>& population_name_offset) {
204205 std::stringstream ss;
205206 ss << outpath << " /out.dat" ;
@@ -210,7 +211,7 @@ void output_spikes_parallel(
210211 remove (fname.c_str ());
211212 }
212213#ifdef ENABLE_SONATA_REPORTS
213- sonata_create_spikefile (outpath);
214+ sonata_create_spikefile (outpath, filename );
214215 output_spike_populations (population_name_offset);
215216 sonata_write_spike_populations ();
216217 sonata_close_spikefile ();
@@ -253,7 +254,7 @@ void output_spikes_parallel(
253254}
254255#endif
255256
256- void output_spikes_serial (const char * outpath) {
257+ static void output_spikes_serial (const char * outpath) {
257258 std::stringstream ss;
258259 ss << outpath << " /out.dat" ;
259260 std::string fname = ss.str ();
@@ -288,7 +289,7 @@ void output_spikes(const char* outpath,
288289 }
289290#if NRNMPI
290291 if (corenrn_param.mpi_enable && nrnmpi_initialized ()) {
291- output_spikes_parallel (outpath, population_name_offset);
292+ output_spikes_parallel (outpath, " out " , population_name_offset);
292293 } else
293294#endif
294295 {
0 commit comments