Note: This discussion is about an older version of the COMSOL Multiphysics® software. The information provided may be out of date.

Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.

Matlab Comsol function evaluated in parallel on cluster

Please login with a confirmed email address before reporting spam

I've made a function JSC.m which I am able to call like this:
JSC('TE',1001,500E-9,70E-9,30E-9)

- and it works fine, I get the output I want.

Now this is pretty time comsuming which is why I want to evaluate it in parallel for different inputs using the cluster available to me. So I've made this code:

sched = findResource('scheduler','type','local');
job1 = createJob(sched);
createTask(job1, @JSC, 1, {{'TE',1001,500E-9,70E-9,30E-9} {'TE',1001,500E-9,70E-9,40E-9} {'TE',1001,500E-9,70E-9,50E-9} {'TE',1001,500E-9,70E-9,60E-9}});
submit(job1);
waitForState(job1,'finished');
results = getAllOutputArguments(job1)

But it just returns results = Empty cell array: 4-by-0
Now this job scheduling works fine for rand.m for example:
sched = findResource('scheduler','type','local');
job1 = createJob(sched);
createTask(job1, @rand, 1, {{3,3} {3,3} {3,3} {3,3}});
submit(job1);
waitForState(job1,'finished');
results = getAllOutputArguments(job1);
results{1:4}

returns 4 3-by-3 matrices.
The only difference between rand.m and my JSC.m as I see it, is that it is linked with Comsol, so there is some Comsol code inside it. But why is it able to evaluate it with a normal function call, but not when I use a cluster?
I can post the code for JSC.m if necessary.

1 Reply Last Post May 21, 2011, 10:48 a.m. EDT

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago May 21, 2011, 10:48 a.m. EDT
Hi

did you make it and ran comsol on a cluster \?
with matlab?

i have few computers like master and slaves
can i use cluster too or i have to have some special programs?

can you please advice me

Best regards,
Arye
Hi did you make it and ran comsol on a cluster \? with matlab? i have few computers like master and slaves can i use cluster too or i have to have some special programs? can you please advice me Best regards, Arye

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.