Sunday, February 27, 2011

qsub error - /bin/sh :no such file or directory

I was working with intel MTL Linux cluster recently and ran into this error. I had a shell script that would run another shell script which in turn runs my executable files. I created a script called batchjob to run my shell script.

Invariably, it kept throwing error at me. It said bin/sh no such file or directory. I took me a while to figure out what was wrong. In my first script I used something like
sh args1 args2
There is one issue with this. The file is under a folder called project and the batch server does not know the location. So the first change was to add the directory path. So it became:
sh $HOME/project/ args1 args2
Although, it did help the program still had errors. I was passing a data file as input to my program as args1. I had to do apply the same trick there too.
sh $HOME/project/ $HOME/project/data/exe.dat args2
The other change I made was to remove the line #!bin/sh, you don't have to do that if you are sure the script runs without qsub.

Another issue was to set the compiler variables. So I added the following command:
source /opt/intel/bin/ intel64
 After these changes the script runs just fine. Hope this will help someone.

No comments:

Post a Comment