Cluster profile for deployed apps

2 visualizzazioni (ultimi 30 giorni)
Adam Gogacz
Adam Gogacz il 18 Feb 2019
Commentato: Adam Gogacz il 21 Feb 2019
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.

Risposte (2)

Hitesh Kumar Dasika
Hitesh Kumar Dasika il 21 Feb 2019
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 il 21 Feb 2019
Modificato: Adam Gogacz il 21 Feb 2019
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 Commenti
Hitesh Kumar Dasika
Hitesh Kumar Dasika il 21 Feb 2019
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 il 21 Feb 2019
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.

Accedi per commentare.

Categorie

Scopri di più su Third-Party Cluster Configuration in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by