-
Notifications
You must be signed in to change notification settings - Fork 13
Adding optional mpirun command to pass to python interface. #47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Passing a string 'mpirun' to python interface functions 'simulat' and 'optimize'. Defaults to "mpirun -np ". Also distributing the number of cores over initial conditions and also over Petsc.
The standard Hamiltonian model is only needed in python if either the time step size dT or the carrier wave frequencies are not specified by the user, and hence need to be computed based on the system Hamiltonian.
quandary.py
Outdated
|
||
|
||
def simulate(self, *, pcof0=[], pt0=[], qt0=[], maxcores=-1, datadir="./run_dir", quandary_exec="", cygwinbash="", batchargs=[]): | ||
def simulate(self, *, pcof0=[], pt0=[], qt0=[], maxcores=-1, datadir="./run_dir", quandary_exec="", cygwinbash="", mpirun="mpirun -np ", batchargs=[]): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be nice to add to docstring, here and below
quandary.py
Outdated
myrun = "mpirun -np " | ||
runcommand = f"{myrun} {ncores} " + runcommand | ||
myrun = mpirun | ||
runcommand = f"{myrun}{ncores} " + runcommand |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
runcommand = f"{myrun}{ncores} " + runcommand | |
runcommand = f"{myrun} {ncores} " + runcommand |
Maybe leave the space here so the "mpirun -np" will also work
Does this make the |
Passing a string 'mpirun' to python interface functions 'simulate' and 'optimize'. Defaults to "mpirun -np ".
Also distributing the maximum number of cores over initial conditions first and then over Petsc cores for the remaining ones.