parpool fails to start with modified userpath and startup.m script [9.7.0.1261785 (R2019b) Update 3]

3 Ansichten (letzte 30 Tage)
OS: Win10 x64
Matlab: 9.7.0.1261785 (R2019b) Update 3 x64
CPU: Intel Xeon E5-1630 x64, 32 GB ram
parpool() fails to start when a custom userpath and startup.m script are defined.
update 202000806: owing to multiple users on the system, distinct pathdefs are needed to separate access to code. For this reason a custom userpath is set within which the pathdef.m respective to the user is saved.
An error ding sounds, but no error message is printed to console. After waiting longer than the time it takes for parpool to initiate using default settings and executing CTRL+C the console prints below:
Operation terminated by user during parallel.internal.getJavaFutureResult (line 15)
In parallel.internal.pool.InteractiveClient/waitForSessionCreation (line 638)
[gotSession, session] = parallel.internal.getJavaFutureResult(...
In parallel.internal.pool.InteractiveClient/start (line 350)
obj.Session = obj.waitForSessionCreation(sessionFuture, connectionCounter, ...
In parallel.Pool>iStartClient (line 796)
spmdInitialized = client.start(poolType , numWorkers, cluster, ...
In parallel.Pool.hBuildPool (line 585)
iStartClient(client, 'pool', cluster, guiMode, supportRestart, argsList);
In parallel.internal.pool.doParpool (line 18)
pool = parallel.Pool.hBuildPool(constructorArgs{:});
In parpool (line 98)
pool = parallel.internal.pool.doParpool(varargin{:});
Matlabroot:
C:\Program Files\MATLAB\R2019b
My userpath:
userpath('C:\Users\MyUsername\Documents\MATLAB\2019b')
Pathdef location:
C:\Users\MyUsername\Documents\MATLAB\2019b\pathdef.m
startup script:
C:\Users\MyUsername\Documents\MATLAB\2019b\startup.m:
% save starting directory
startdir = 'D:\Data\MyUsername\';
% specify arbitrary directory containing pathdef.m
pathdir = 'C:\Users\MyUsername\Documents\MATLAB\2019b';
% change directory so that target 'pathdef.m' has highest precedence
% in the MATLAB search path
cd(pathdir)
% set the MATLAB search path using PATH
path(pathdef)
% change directory back to the starting directory
cd(startdir)
To reiterate, parpool() starts as expected with default startup.

Antworten (2)

Patrick Cody
Patrick Cody am 11 Aug. 2020
Couldn't get this to work and need parpool for analyses. Desided to just install Matlab 2020a and I no longer experience the issue on the multi-user computer.

Raymond Norris
Raymond Norris am 6 Aug. 2020
Hi Patrick,
My suggestion is
  • From within MATLAB, call startup. Any issues? Then,
  • Start up MATLAB with this startup.m. Any issues? Then,
  • Comment out startup.m and uncomment one line at a time to see if any of it works.
Looking at it, it would seem as though
path(pathdef)
is the culprit. If so, you should see it on step 1 above.
Raymond
  1 Kommentar
Patrick Cody
Patrick Cody am 6 Aug. 2020
Hi Raymond,
Thanks for your answer. I've updated the question to reflect this:
"update 202000806: owing to multiple users on the system, distinct pathdefs are needed to separate access to code. For this reason a custom userpath is set within which the pathdef.m respective to the user is saved."
Using the startup.m posted in my code, with userpath defined as above, calling 'startup' in console completes without error or output.
Calling 'path' outputs contents of pathdef.m in userpath.
In spite of startup running succesfully, parpool() still fails to start. I commented out 'path(pathdef)' from startup and parpool() still fails to start. The culprit may be the userpath definition. I'd assume the matlab instance is looking for something in the default user path.
If I invoke: restoredefaultpath; matlabrc in console, the default path lacking my user's code directories is output with 'path'. Unfortunaely, parpool() still fails to initialize.
With the original login user that was used to install matlab, running matlab then parpool() from that account works just fine.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Startup and Shutdown finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by