Cluster profile for deployed apps

1 次查看(过去 30 天)
Adam Gogacz
Adam Gogacz 2019-2-18
I have an app (standalone app compiled using MATLAB Compiler) running on machines where MATLAB is not installed. The app uses Parallel Computing Toolbox. Hence, how do I create a "Cluster Profile" programmatically? Are there other ways to do this? Thanks.

回答(2 个)

Hitesh Kumar Dasika
Hi Adam
You can make use of the cluster object properties and set them similar to how they will be set using Cluster Profile Manager. Please find the attached documentation links that talk about the same.
You can also access specific cluster profiles with the help of following functions.

Adam Gogacz
Adam Gogacz 2019-2-21
编辑:Adam Gogacz 2019-2-21
Hi Hitesh,
These assume that a profile exist, which is not the case when launching an app on a different machine from where the standalone app was created. I need to be able to create a profile from scratch. What I have done so far is the following workaround,
  • From "Cluster Profile Manager" I exported default "local" profile to local.settings file
  • took the contents and modified some things such as path, num cores/thread,
  • created a function to export this xml file to temp dir upon launch of standalone app
  • import the profile from the file
  • start the pool now.
What I would like to do is to create the cluster 'object' from scratch.
  2 个评论
Hitesh Kumar Dasika
Hi Adam
You can do the modifications to cluster object by using the cluster properties as well. You can set the properties as part of the code by using the cluster object itself. Below is a small example of what I meant.
>> c = parcluster('local')
>>c.NumThreads = 10
>>c.NumWorkers = 10
Adam Gogacz
Adam Gogacz 2019-2-21
Hey,
The problem is that when you compile your app into a standalone app, then the embedded 'local' profile contains a property indicating where the scheduler stores temp files on harddrive. Now, of course, this is not ok as my client running my app may have different file structure and privileges.
When you start the parallel pool on another machine the process fails as it looks for a path that does not exist.
This is only a problem for deployed apps.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Third-Party Cluster Configuration 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by