RuntimeError:
An attempt has been made to start a new process before the
current process has finished its bootstrapping phase.
This probably means that you are not using fork to start your
child processes and you have forgotten to use the proper idiom
in the main module:
if __name__ == '__main__':
freeze_support()
def run():
...
if __name__=="__main__":
run()
Which works fine until I add a time dependent Hamiltonian, then I get an error:
_pickle.PicklingError: Can't pickle <function run.<locals>.H1_coeff at 0x06B21618>: attribute lookup H1_coeff on __main__ failed
where my H1_coeff is:
def H1_coeff(t, args):
return np.cos(t)
HMC=[H0,[H1,H1_coeff]]
Is there another tip to get the mcsolver working? I know it's not ideal to be using windows but it's all I have at the moment.
Thanks,
Joe
In short, freeze_support issues are a major pain. I have really no clue how to fix them. Indeed, you cannot pass an indented function to the parallel processing routines. This is one of the many reasons why we frown upon windows. Or at least I do.
Paul
--
You received this message because you are subscribed to the Google Groups "QuTiP: Quantum Toolbox in Python" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qutip+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.