Hi, I hope you don't mind me bringing this back.
I am trying to have a master process execute other processes in parallel, and some of those need BatchUpdate. Here is what I am doing now:
Master Process:
Code: Select all
ExecuteCommand('"(...)Hustle.exe" "\\(...)\FileThatParallelRunsProcessA.txt" 20', 1);
BatchUpdateStart;
ExecuteCommand('"(...)Hustle.exe" "\\(...)\FileThatParallelRunsProcessB.txt" 20', 1);
BatchUpdateFinishWait(0);
Content of FileThatParallelRunsProcessA.txt (ProcessB is a separate .txt file with the same lines, just with the process name changed) (this is the first line, repeated n times over pCountry):
Code: Select all
\\(location on server)\tm1runti.exe -process ProcessA -adminhost host -server servername -user username
-Camnamespace CNS -pwd password pCountry="xxx1" pMonth="yyy" pVersion="zzz" pParallel=1
Both ProcessA and ProcessB create the necessary source and target views, set the sourcedata as the source view, viewzeroout the target view, then do some CellPutNs in the data tab (ProcessB a bunch more than ProcessA), and then delete temporary objects in epilogue. ProcessB in addition has BatchUpdateStart in Prologue and BatchUpdateFinishWait(0) in Epilogue. Both of them load into the same cube, but to different measures, and from different source cubes.
ProcessA has no BatchUpdate in the process, and it runs fine.
ProcessB has an insane amount of CellPutNs, so it needs BatchUpdate, or it runs for days.
Here is what I found: When I have BatchUpdateFinish in Epilogue of ProcessB, this causes the parallel processes to get stuck in an eternal "Wait" cycle. I guess the first process that is ready tries to finish batch updating, but all the others are still updating the cube. Removing the BatchUpdateFinish for parallel loads solved the infinite loop, but here came the problem I am struggling with now.
When I remove BatchUpdateStart from the Prologue of ProcessB, and have it outside in the master process, it doesn't seem to work, I don't think BatchUpdate is turned on for the case. It runs for ages, when it should be done in minutes. When I have BatchUpdateStart in the Prologue tab of the process AND the master process, but only have BatchUpdateFinishWait(0) in the master process, the data isn't saved. All the calculations run (textoutput in the data tab confirms that data is fine) and they run fast, but I get an empty view as a result, because the BatchUpdate didn't seem to finish. (Strange that I get the textoutputs, though)
It seems to me from all this that BatchUpdateStart does not work outside in a master process with how I am doing it, and I wondered whether you could offer some advice on what could I be doing wrong. My other option (I think, I haven't tested it) is to somehow determine which country runs for the longest, and have the BatchUpdateFInish turned on for that one in the Epilogue of ProcessB, but that kind of changes with the data input in the cells, so it's a wonky solution.