parallel computing problem
이전 댓글 표시
Hallo
I am trying to create a job with 2 tasks, each task would call a function i have created that takes as an input an ip address and accordingly it activates 2 devices attached to my pc through a gigabit ethernet interface and these devices do have the submitted ip addresses. The result from running the code is nothing as if it doesn't call the called method at all.
CODE:
%%Parallel computing
% This script submits a job with 3 tasks
sched = findResource();
job3b = createJob(sched,'FileDependencies',{'Main.m'});
createTask(job3b, @Main, 1, '192.168.10.2');
createTask(job3b, @Main, 1, '192.168.30.2');
submit(job3b);
waitForState(job3b, 'finished'); % optional
sprintf('Finished Running Job');
results = getAllOutputArguments(job3b);
USRP1_output=results(1);
USRP2_output=results(2);
sprintf('Got Output Arguments');
destroy(job3b); % permanently removes job data
sprintf('Test Completed')
CODE END
Note that the Main.m file works on its own if you run it independently and gives results while the results in this code fragment is an empty matrix (2x0)
sorry for the inconvenience and Thank You in advance
best regards
답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 MATLAB에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!