Skip to content

Commit 25bd149

Browse files
Merge pull request #2 from CNS-OIST/py2py3
[py2py3-patch] cannot open unbuffered io stream in py3
2 parents 537dd78 + 617f030 commit 25bd149

File tree

7 files changed

+12
-12
lines changed

7 files changed

+12
-12
lines changed

publication_models/Anwar_J Neurosci_2013/StochasticCaburst_cluster.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -698,19 +698,19 @@
698698
if cap_m0_count<round(CaP_ro*surfarea*CaP_m0_p):
699699
sim.setTriCount(i, 'CaP_m0', sim.getTriCount(i, 'CaP_m0') + 1)
700700
cap_m0_count = cap_m0_count + 1
701-
count = count +1
701+
count = count +1
702702
elif cap_m1_count<round(CaP_ro*surfarea*CaP_m1_p):
703703
sim.setTriCount(i, 'CaP_m1', sim.getTriCount(i, 'CaP_m1') + 1)
704704
cap_m1_count = cap_m1_count + 1
705-
count = count +1
705+
count = count +1
706706
elif cap_m2_count<round(CaP_ro*surfarea*CaP_m2_p):
707707
sim.setTriCount(i, 'CaP_m2', sim.getTriCount(i, 'CaP_m2') + 1)
708708
cap_m2_count = cap_m2_count + 1
709-
count = count +1
709+
count = count +1
710710
elif cap_m3_count<round(CaP_ro*surfarea*CaP_m3_p):
711711
sim.setTriCount(i, 'CaP_m3', sim.getTriCount(i, 'CaP_m3') + 1)
712712
cap_m3_count = cap_m3_count + 1
713-
count = count +1
713+
count = count +1
714714
else:
715715
print('Cluster size is larger than the number of CaP channels available')
716716

publication_models/Chen_FNeuroinf__2017/purkinje_model/parallel_branch_background.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989
sim.run(SIM_TIME)
9090
time_cost = (time.time() - start_time)
9191

92-
proc_file = open(RESULT_DIR + '/proc_%i.csv' % (steps.mpi.rank), 'w', 0)
92+
proc_file = open(RESULT_DIR + '/proc_%i.csv' % (steps.mpi.rank), 'w', 1)
9393
proc_file.write("SimTime,CompTime,SyncTime,IdleTime,nIteration\n")
9494
proc_file.write("%f,%f,%f,%f,%i\n" % (time_cost, sim.getCompTime(), sim.getSyncTime(), sim.getIdleTime(), sim.getNIteration()))
9595
proc_file.close()

publication_models/Chen_FNeuroinf__2017/purkinje_model/parallel_branch_influx.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
ca_conc_preset_file.close()
7979

8080
if steps.mpi.rank == 0:
81-
conc_result = open(RESULT_DIR + '/calcium_conc_%iprocs.dat' % (steps.mpi.nhosts), 'w', 0)
81+
conc_result = open(RESULT_DIR + '/calcium_conc_%iprocs.dat' % (steps.mpi.nhosts), 'w', 1)
8282
conc_result.write('#Entries: Time ')
8383
for roi in rois:
8484
conc_result.write('%s ' % (roi))
@@ -150,7 +150,7 @@
150150
time_cost = (time.time() - start_time)
151151
conc_result.close()
152152

153-
proc_file = open(RESULT_DIR + '/proc_%i.csv' % (steps.mpi.rank), 'w', 0)
153+
proc_file = open(RESULT_DIR + '/proc_%i.csv' % (steps.mpi.rank), 'w', 1)
154154
proc_file.write("SimTime,CompTime,SyncTime,IdleTime,nIteration\n")
155155
proc_file.write("%f,%f,%f,%f,%i\n" % (time_cost, sim.getCompTime(), sim.getSyncTime(), sim.getIdleTime(), sim.getNIteration()))
156156
proc_file.close()

publication_models/Chen_FNeuroinf__2017/purkinje_model/parallel_fullcell_background.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989
sim.run(SIM_TIME)
9090
time_cost = (time.time() - start_time)
9191

92-
proc_file = open(RESULT_DIR + '/proc_%i.csv' % (steps.mpi.rank), 'w', 0)
92+
proc_file = open(RESULT_DIR + '/proc_%i.csv' % (steps.mpi.rank), 'w', 1)
9393
proc_file.write("SimTime,CompTime,SyncTime,IdleTime,nIteration\n")
9494
proc_file.write("%f,%f,%f,%f,%i\n" % (time_cost, sim.getCompTime(), sim.getSyncTime(), sim.getIdleTime(), sim.getNIteration()))
9595
proc_file.close()

publication_models/Chen_FNeuroinf__2017/purkinje_model/ssa_branch_influx.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
try: os.mkdir(RESULT_DIR)
5050
except: pass
5151

52-
conc_result = open(RESULT_DIR + '/ssa_calcium_conc.dat', 'w', 0)
52+
conc_result = open(RESULT_DIR + '/ssa_calcium_conc.dat', 'w', 1)
5353
conc_result.write('#Entries: Time ')
5454
for roi in rois:
5555
conc_result.write('%s ' % (roi))

publication_models/Chen_FNeuroinf__2017/simple_model/parallel_simulation.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ def gen_geom():
125125
sim_result_dir = RESULT_DIR + "/%e_%s_%ihosts" % (MOLECULE_RATIO, MESHFILE, steps.mpi.nhosts)
126126
try: os.mkdir(sim_result_dir)
127127
except: pass
128-
summary_file = open(sim_result_dir + "/result.csv", 'w', 0)
128+
summary_file = open(sim_result_dir + "/result.csv", 'w', 1)
129129
summary_file.write("Simulation Time,")
130130

131131
########################################################################
@@ -144,7 +144,7 @@ def gen_geom():
144144
start_time = time.time()
145145
sim.run(ENDTIME)
146146
end_time = (time.time() - start_time)
147-
proc_file = open(sim_result_dir + "/proc_%i.csv" % (steps.mpi.rank), 'w', 0)
147+
proc_file = open(sim_result_dir + "/proc_%i.csv" % (steps.mpi.rank), 'w', 1)
148148
proc_file.write("SimTime,CompTime,SyncTime,IdleTime,nIteration\n")
149149
proc_file.write("%f,%f,%f,%f,%i\n" % (end_time, sim.getCompTime(), sim.getSyncTime(), sim.getIdleTime(), sim.getNIteration()))
150150
proc_file.close()

publication_models/Chen_FNeuroinf__2017/simple_model/ssa_simulation.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ def gen_geom():
117117
except: pass
118118
try: os.mkdir(sim_result_dir)
119119
except: pass
120-
summary_file = open(sim_result_dir + "/result.csv", 'w', 0)
120+
summary_file = open(sim_result_dir + "/result.csv", 'w', 1)
121121
summary_file.write("Simulation Time,")
122122

123123
########################################################################

0 commit comments

Comments
 (0)