Why AdditionalPaths of batch() do not work on Web-App-Sever / Parallel Server

2 visualizaciones (últimos 30 días)
Hi,
I have an issue with 'AdditionalPaths' of the batch command. When the program runs in the appDesigner of my normal Matlab, the command works well and the worker find the code which is located in a specified path on the parallelServer and not in the default search path.
If the app is deployed as CTF and run on the webServer this does not work anymore.
Error message: Warning: Previously accessible file "C:\Data\...\*m" is now inaccessible.
The full code is to big to send it everytime from the webServer to the parallelServer.
job = batch(c,@file2run,0, ...
...
'AdditionalPaths',fullfile('C:\Data\...\'),...
'AttachedFiles', FilesToAttach,...
'AutoAttachFiles', false,...
'AutoAddClientPath',false,...
'CurrentFolder' , '.');
Rgards Olaf
R2020b

Respuestas (1)

Sam Marshalik
Sam Marshalik el 15 de Nov. de 2021
Hey Olaf, is this the workflow you are trying to set up: You created an app in Appdesigner which submits a batch job to MATLAB Parallel Server. You now want to make that app accessible via MATLAB Web App Server to others in a web browser. The MATLAB Web App Server app will submit a batch job to MATLAB Parallel Server and act as a front end?
Can you verify that the batch job (coming from MATLAB Web App Server) is being submitted to a MATLAB Parallel Server cluster (using the right profile) and that, that path exists on the MATLAB Parallel Server side?
Also, are you able to comment on the motivation behind connecting these two products together? Curious about the usecase.
  2 comentarios
Olaf
Olaf el 16 de Nov. de 2021
Hi Sam, thank you very much for your answer. Yes we want to be able to deploy a very sophisticated tool globally in the company without distributing the source code to the users.
Also, the tool requires a lot of processing power. So users can have small lightweight notebooks and still use this tool. The calculations run for several days or even weeks.
If the code is stored in the matlabroot/toolbox/... folder, there are no problems.
I don't know if this is because of the "addpath" command in the "file2run.m" or if Matlab automatically crawls the tooolbox folder. In this case I don't need the call via "AdditionalPaths" anymore. But it is very impractical to store the sourcecode in the toolbox folder.
The WebServer uses the same settings of the parallel server as the computer on which the CTF file was compiled. In test mode (debug mode) on the compiling machine the AdditionalPaths command works fine and on the web server it does not.
The user account of the web server has the same rights as the user account on the compiling computer.
Regards Olaf
Sam Marshalik
Sam Marshalik el 16 de Nov. de 2021
This sounds very interesting and I would love to learn more about your use case and how MathWorks tools can help out. If you are interested, send me an e-mail at smarshal@mathworks.com to chat more; I can also show you a demo of this workflow running in AWS.
I agree that you would not want to include your files in the MATLAB install, that sounds like a potential mess. I would suggest to reach out to Technical Support so they can diagnose the issue further. Just to confirm, if you remove that "AdditionalPaths" line from the batch command it runs fine?

Iniciar sesión para comentar.

Community Treasure Hunt

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

Start Hunting!

Translated by