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

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

I have also recently encountered this same error message. Have you figured out how to resolve this issue?
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

Asked:

on 16 Nov 2011

Commented:

on 7 Aug 2014

Community Treasure Hunt

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

Start Hunting!