I have an issue when trying to use parallelization when loading a stand-alone Package. To simplify the question I have a few scenarios:
The first scenario, with single-kernel evaluation, works fine:
Needs["MyPackage`"] then run Map[function_call_from_package, {data}]Now on to multiple kernels and parallel evalution:
ParallelNeeds["MyPackage`"] ParallelMap[function_call_from_package, {data}, DistributedContexts -> {"MyPackage`", "Global`"}]this fails, reporting "Cannot open MyPackage`"
I also tried tips from a previous discussion (Package found with `Needs`, but not with `ParallelNeeds`). This reports "Import::nffil: File not found during Import"
It's trying to load stuff from ".m" files which have generic paths
"profilePath"-> "/Package/
because this is later joined as
Import[StringJoin[Directory[],OptionValue["profilePath"]],"Table"];If I put absolute paths to "profilePath" -> "Absolute paths", it works.
The latter is an ugly solution, so I would appreciate your help on this.