Hi all,
I think the problem in the 2.6.1 is as Andreas's described
The reason is that DistributeDefinitions and ParallelNeeds will automatically be evaluated on a newly launched subkernel
In my previous messages I proposed a workaround to this problem.
ParalleEvaluate@Needs will not evaluate automatically so changing
ParallelNeeds to
ParalleEvaluate@Needs will prevent
SpinDynamica to be loaded automatically to the newly launched sub-kernels,. After this change the new sub-kernels started to complain that the
SpinSystem and
Basis are not set so I decided to distribute them in the
PrepareParallel routine.
DistributedContexts->All all option of the individual
Parallelize[] routines will probably make
SpinDynamica distribute stuff automatically to the new sub-kernels. The
DistributedContexts->All option will cause error message
EventList::cantdo: cannot interpret event specifications: {events:{_Event..},evlistmore:(Except[_Rule]..),evlistopts___Rule}
in the subsequent calculations. I decided to try distribution code like
stufftodistribute = {tmin, tmax, \[Delta]t, events, evopts,
varsubrules, opbasis, basis, opts};
DistributeDefinitions[stufftodistribute];
instead of the
DistributedContexts->All option. This fixed the problem. There probably is a solution to this problem which does not include complex changes to the individual routines. To find this solution we need to investigate better what causes the
EventList::cantdo: cannot interpret event specifications: {events:{_Event..},evlistmore:(Except[_Rule]..),evlistopts___Rule}
messages.
Jyrki