@@ -161,33 +161,6 @@ int (*nrn2core_all_spike_vectors_return_)(std::vector<double>& spikevec, std::ve
161161// stored in the nt.presyns array and nt.netcons array respectively
162162namespace coreneuron {
163163extern corenrn_parameters corenrn_param;
164- int nrn_setup_multiple = 1 ; /* default */
165- int nrn_setup_extracon = 0 ; /* default */
166-
167- // nrn_setup_extracon extra connections per NrnThread.
168- // i.e. nrn_setup_extracon * nrn_setup_multiple * nrn_nthread
169- // extra connections on this process.
170- // The targets of the connections on a NrnThread are randomly selected
171- // (with replacement) from the set of ProbAMPANMDA_EMS on the thread.
172- // (This synapse type is not strictly appropriate to be used as
173- // a generalized synapse with multiple input streams since some of its
174- // range variables store quantities that should be stream specific
175- // and therefore should be stored in the NetCon weight vector. But it
176- // might be good enough for our purposes. In any case, we'd like to avoid
177- // creating new POINT_PROCESS instances with all the extra complexities
178- // involved in adjusting the data arrays.)
179- // The nrn_setup_extracon value is used to allocate the appropriae
180- // amount of extra space for NrnThread.netcons and NrnThread.weights
181- //
182- // The most difficult problem is to augment the rank wide inputpresyn_ list.
183- // We wish to randomly choose source gids for the extracon NetCons from the
184- // set of gids not in "multiple" instance of the model the NrnThread is a
185- // member of. We need to take into account the possibilty of multiple
186- // NrnThread in multiple "multiple" instances having extra NetCon with the
187- // same source gid. That some of the source gids may be already be
188- // associated with already existing PreSyn on this rank is a minor wrinkle.
189- // This is done between phase1 and phase2 during the call to
190- // determine_inputpresyn().
191164
192165#ifdef _OPENMP
193166static OMP_Mutex mut;
@@ -208,17 +181,12 @@ std::vector<NetCon*> netcon_in_presyn_order_;
208181std::vector<int *> netcon_srcgid;
209182
210183/* read files.dat file and distribute cellgroups to all mpi ranks */
211- void nrn_read_filesdat (int & ngrp, int *& grp, int multiple, int *& imult, const char * filesdat) {
184+ void nrn_read_filesdat (int & ngrp, int *& grp, const char * filesdat) {
212185 patstimtype = nrn_get_mechtype (" PatternStim" );
213186 if (corenrn_embedded) {
214187 ngrp = corenrn_embedded_nthread;
215- nrn_assert (multiple == 1 );
216188 grp = new int [ngrp + 1 ];
217- imult = new int [ngrp + 1 ];
218189 (*nrn2core_group_ids_)(grp);
219- for (int i = 0 ; i <= ngrp; ++i) {
220- imult[i] = 0 ;
221- }
222190 return ;
223191 }
224192
@@ -251,25 +219,17 @@ void nrn_read_filesdat(int& ngrp, int*& grp, int multiple, int*& imult, const ch
251219 }
252220
253221 ngrp = 0 ;
254- grp = new int [iNumFiles * multiple / nrnmpi_numprocs + 1 ];
255- imult = new int [iNumFiles * multiple / nrnmpi_numprocs + 1 ];
222+ grp = new int [iNumFiles / nrnmpi_numprocs + 1 ];
256223
257224 // irerate over gids in files.dat
258- for (int iNum = 0 ; iNum < iNumFiles * multiple ; ++iNum) {
225+ for (int iNum = 0 ; iNum < iNumFiles; ++iNum) {
259226 int iFile;
260227
261228 nrn_assert (fscanf (fp, " %d\n " , &iFile) == 1 );
262229 if ((iNum % nrnmpi_numprocs) == nrnmpi_myid) {
263230 grp[ngrp] = iFile;
264- imult[ngrp] = iNum / iNumFiles;
265231 ngrp++;
266232 }
267- if ((iNum + 1 ) % iNumFiles == 0 ) {
268- // re-read file for each multiple (skipping the two header lines)
269- rewind (fp);
270- nrn_assert (fscanf (fp, " %*s\n " ) == 0 );
271- nrn_assert (fscanf (fp, " %*d\n " ) == 0 );
272- }
273233 }
274234
275235 fclose (fp);
@@ -448,11 +408,9 @@ void nrn_setup(const char* filesdat,
448408
449409 int ngroup;
450410 int * gidgroups;
451- int * imult;
452- nrn_read_filesdat (ngroup, gidgroups, nrn_setup_multiple, imult, filesdat);
411+ nrn_read_filesdat (ngroup, gidgroups, filesdat);
453412 UserParams userParams (ngroup,
454413 gidgroups,
455- imult,
456414 datpath,
457415 strlen (restore_path) == 0 ? datpath : restore_path);
458416
@@ -497,7 +455,6 @@ void nrn_setup(const char* filesdat,
497455
498456 // gap junctions
499457 if (nrn_have_gaps) {
500- assert (nrn_setup_multiple == 1 );
501458 nrn_partrans::transfer_thread_data_ = new nrn_partrans::TransferThreadData[nrn_nthread];
502459 nrn_partrans::setup_info_ = new nrn_partrans::SetupInfo[userParams.ngroup ];
503460 if (!corenrn_embedded) {
@@ -522,9 +479,9 @@ void nrn_setup(const char* filesdat,
522479 NrnThread& nt = *n;
523480 {
524481#ifdef _OPENMP
525- p1.populate (nt, 0 , mut);
482+ p1.populate (nt, mut);
526483#else
527- p1.populate (nt, 0 );
484+ p1.populate (nt);
528485#endif
529486 }
530487 });
@@ -565,7 +522,6 @@ void nrn_setup(const char* filesdat,
565522
566523 model_size ();
567524 delete[] userParams.gidgroups ;
568- delete[] userParams.imult ;
569525
570526 if (nrnmpi_myid == 0 && !corenrn_param.is_quiet ()) {
571527 printf (" Setup Done : %.2lf seconds \n " , nrn_wtime () - time);
@@ -593,7 +549,6 @@ void setup_ThreadData(NrnThread& nt) {
593549}
594550
595551void read_phasegap (NrnThread& nt, UserParams& userParams) {
596- nrn_assert (userParams.imult [nt.id ] == 0 );
597552 nrn_partrans::SetupInfo& si = nrn_partrans::setup_info_[nt.id ];
598553 si.ntar = 0 ;
599554 si.nsrc = 0 ;
@@ -903,9 +858,9 @@ void read_phase1(NrnThread& nt, UserParams& userParams) {
903858
904859 { // Protect gid2in, gid2out and neg_gid2out
905860#ifdef _OPENMP
906- p1.populate (nt, userParams. imult [nt. id ], mut);
861+ p1.populate (nt, mut);
907862#else
908- p1.populate (nt, userParams. imult [nt. id ] );
863+ p1.populate (nt);
909864#endif
910865 }
911866}
0 commit comments