Skip to content

Commit

Permalink
[EXPR-2]debug plot errors
Browse files Browse the repository at this point in the history
  • Loading branch information
sudheerad9 committed Jul 14, 2021
1 parent 28c67fb commit 140339f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
8 changes: 5 additions & 3 deletions SirIsaac/fittingProblem.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ def fitAll(self,usePreviousParams=True,fitPerfectModel=False,resume=True,

if maxNumFit is None: maxNumFit = len(self.fittingModelNames)

for name in self.fittingModelNames[3:4]:
for name in self.fittingModelNames[0:1]:
fittingModel = self.fittingModelDict[name]
print("fittingModel",fittingModel)
# 4.18.2012
Expand Down Expand Up @@ -293,7 +293,7 @@ def fitAll(self,usePreviousParams=True,fitPerfectModel=False,resume=True,
orderedLs = []
if not hasattr(self,'stopFittingN'):
self.stopFittingN = 3
for n in self.fittingModelNames[3:4]:
for n in self.fittingModelNames[0:1]:
if self.logLikelihoodDict.has_key(n):
orderedLs.append(self.logLikelihoodDict[n])
if (len(orderedLs) > self.stopFittingN):
Expand Down Expand Up @@ -1730,7 +1730,7 @@ def fitToData(self,fittingData,indepParamsList=[[]],
else: # run in parallel 3.21.2012
outputDict = self.localFitToData_parallel(self.numprocs,fittingData,
dataModel,ens,indepParamsList)
print("output dictttttttttttttttttttttttttttttt",outputDict)
# print("output dictttttttttttttttttttttttttttttt",outputDict)
indices = scipy.sort(outputDict.keys())
self.costList = [ outputDict[i][2] for i in indices ]
bestIndex = scipy.argsort(self.costList)[0]
Expand Down Expand Up @@ -1834,6 +1834,8 @@ def localFitToData_parallel(self,numprocs,fittingData,dataModel,

try:
output = load(outputFilename)
print("in outttttttttttttttttttttttttttttttttttttttttttttttttttttt")
print(output)
os.remove(outputFilename)
os.remove(prefix+"stdout.txt")
except IOError:
Expand Down
5 changes: 5 additions & 0 deletions SirIsaac/localFitParallel.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@

### Master Process ###
if MPI_myID == MASTER_PROCESS:
print("kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk")
from simplePickle import save

num_processors = comm.Get_size()
Expand All @@ -71,6 +72,8 @@

# list of startParams indices to pass to the workers
work_array = range(len(startParamsList))
print("work arrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr")
print(work_array)
work_size = len(work_array)

# Dispatch jobs to worker processes
Expand Down Expand Up @@ -118,6 +121,8 @@
comm.send(DIE_INDEX, dest=proc)

# Write data to file
print("in localfittttttttttttttttt")
# print(allOutputsDict)
save(allOutputsDict,outputFilename)

else:
Expand Down

0 comments on commit 140339f

Please sign in to comment.