System calls in matlab with Xgrid produced error -- The unix() and ! commands are disabled.

5 views (last 30 days)
We are using Matlab on our Xgrid system. The job script looks like this:
mc=rand(4)
figure; hold on;
plot(mc(:, 1), 'r');
plot(mc(:, 2), 'g');
plot(mc(:, 3), 'b');
legend('x', 'y', 'z', 'Location', 'Best');
set(gca, 'FontSize', 14);
title('MCFLIRT estimated rotations (radians)');
%print -djpeg99 mc_rot
print(gcf, 'mc_rot.jpeg', '-djpeg');
%%%%%%%%%%%%%%%%%%%%%%
system('pwd');
exit
The first part of the script (until print) worked fine. But when it reached the system command, it hang. After force stop the stop, I can see the error message is "??? Error using ==> system The unix() and ! commands are disabled."
I did "ls -l /dev" during two separated calls of the script using Xgrid (one with the system call, one without), I saw an extra line for the job with system call being " crw--w---- 1 root tty 16, 5 Nov 16 11:26 ttys005". And if I ran the system call without Xgrid, it worked. I didn't get the extra line as well. I guess the problem is the ttys005's ower is root rather than the user who called the job?
I am using Matlab2010b and Mac 10.6.8.
Thanks, Zheng Hui
  2 Comments
Nikolai
Nikolai on 21 May 2013
I have also recently encountered this same error message. Have you figured out how to resolve this issue?
Scott
Scott on 7 Aug 2014
For what its worth, I experienced this same error message a couple of times when I started matlab before all system disks were NFS mounted. Restarting matlab once the disks were mounted resolved the issue.

Sign in to comment.

Answers (0)

Categories

Find more on Get Started with MATLAB in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!