Skip to content

Commit

Permalink
comment code in local fitting which prevents sloppy cell parallelization
Browse files Browse the repository at this point in the history
  • Loading branch information
sudheerad9 committed May 29, 2021
1 parent d10531e commit 96b71bd
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
8 changes: 4 additions & 4 deletions SirIsaac/fittingProblem.py
Original file line number Diff line number Diff line change
Expand Up @@ -1807,9 +1807,9 @@ def localFitToData_parallel(self,numprocs,fittingData,dataModel,

# call mpi
stdoutFile = open(prefix+"stdout.txt",'w')
subprocess.call([ "mpirun","-np",str(numprocs),"python",
subprocess.call([ "mpirun","--oversubscribe", "-np",str(numprocs),"python",
os.path.join(SIRISAACDIR, "localFitParallel.py"),
inputDictFilename ],
inputDictFilename],
stderr=stdoutFile,stdout=stdoutFile,env=os.environ)
stdoutFile.close()
os.remove(inputDictFilename)
Expand Down Expand Up @@ -2630,9 +2630,9 @@ def generateEnsemble_parallel(self,numprocs,dataModel,initialParameters,
# https://stackoverflow.com/questions/60060142/strange-interaction-
# between-h5py-subprocess-and-mpirun
stdoutFile = open(prefix+"stdout.txt",'w')
subprocess.call([ "mpirun","-np",str(numprocs),"python",
subprocess.call([ "mpirun","--oversubscribe", "-np",str(numprocs),"python",
os.path.join(SIRISAACDIR, "generateEnsembleParallel.py"),
inputDictFilename, "--disableC" ],
inputDictFilename],
stderr=stdoutFile,stdout=stdoutFile,env=os.environ)
stdoutFile.close()
os.remove(inputDictFilename)
Expand Down
18 changes: 9 additions & 9 deletions SirIsaac/localFitParallel.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@

## 7.3.2012 disable SloppyCell's parallel stuff
## see SloppyCell's __init__.py
sc = IO.SloppyCell
modules = [ sc,sc.ReactionNetworks,Ensembles,Dynamics,
Collections,PerfectData ]
import socket
for module in modules:
module.HAVE_MPI = False
module.num_procs = 1
module.my_rank = 0
module.my_host = socket.gethostname()
# sc = IO.SloppyCell
# modules = [ sc,sc.ReactionNetworks,Ensembles,Dynamics,
# Collections,PerfectData ]
# import socket
# for module in modules:
# module.HAVE_MPI = False
# module.num_procs = 1
# module.my_rank = 0
# module.my_host = socket.gethostname()

# Constants
MASTER_PROCESS = 0
Expand Down

0 comments on commit 96b71bd

Please sign in to comment.