LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-14-2015, 02:15 PM   #1
tejakalva
LQ Newbie
 
Registered: Jan 2015
Posts: 4

Rep: Reputation: Disabled
Error Message /bin/bash: : No such file or directory


When I run the .cmd file in the cluster I am getting an error message as

/bin/bash: : No such file or directory

The below is the PBS script in the .cmd file

#! /bin/bash
#PBS -o logfile.log
#PBS -e errorfile.err
#PBS -l cput=740:00:00
#PBS -l select=2:ncpus=8
tpdir=`echo $PBS_JOBID | cut -f 1 -d .`
tempdir=$HOME/work/job$tpdir
mkdir -p $tempdir
cd $tempdir
cp -R $PBS_O_WORKDIR/* .
fluent 2ddp -g -t16 -pib -cnf=$PBS_NODEFILE -ssh -i srik.jou >> out
mv ../job$tpdir $PBS_O_WORKDIR/.

Please help me to figure out the problem.
 
Old 01-14-2015, 02:54 PM   #2
joe_2000
Member
 
Registered: Jul 2012
Location: Aachen, Germany
Distribution: Void, Arch, Debian
Posts: 859

Rep: Reputation: 245Reputation: 245Reputation: 245
It means that one of the commands in your script is trying to access a file or directory that does not exist. Most likely it's one of the commands that uses a variable to represent a file or directory, and that variable is empty.

What's with the first line that uses $PBS_JOBID. That variable is never set. Is it set in the calling environment?
 
Old 01-14-2015, 03:11 PM   #3
joe_2000
Member
 
Registered: Jul 2012
Location: Aachen, Germany
Distribution: Void, Arch, Debian
Posts: 859

Rep: Reputation: 245Reputation: 245Reputation: 245
Also note:
You have a space between #! and /bin/bash, not sure how that is interpreted.
The lines 2 to 5 are not evaluated but treated as comments due to the # at the beginning.
 
Old 01-14-2015, 04:02 PM   #4
Habitual
LQ 5k Club
 
Registered: Jan 2011
Location: Nowhere near you, thank God.
Distribution: High Sierra
Posts: 8,598
Blog Entries: 15

Rep: Reputation: Disabled
/path/to/fluent
 
Old 01-15-2015, 05:43 AM   #5
tejakalva
LQ Newbie
 
Registered: Jan 2015
Posts: 4

Original Poster
Rep: Reputation: Disabled
@Habitual

This is the output when I give in the command /path/to/fluent

-bash: /path/to/fluent: No such file or directory

@joe_2000

I removed the space but now I am getting this error.

-bash: /var/spool/PBS/mom_priv/jobs/18406.gnr.SC: /bin/bash^M: bad interpreter: No such file or directory

18406 is the Job ID which is automatically created when I execute the .cmd file
 
Old 01-15-2015, 06:13 AM   #6
J Martin Rushton
Member
 
Registered: Jan 2015
Location: England
Distribution: Mainly CentOS
Posts: 31

Rep: Reputation: Disabled
I took your file and changed the two logs to my preferred output in the test environment:

#PBS -e logs
#PBS -o logs

I then added:

set -vx

Just after the last PBS directive. To avoid trying to actually run fluent I added an echo to the front:

echo "fluent 2ddp -g -t16 -pib -cnf=$PBS_NODEFILE -ssh -i srik.jou" >> out

The job submitted ($ qsub X) and ran with no problems. Therefore:

1) As Habitual says, replace the bare command "fluent" with an absolute path to it.
2) Add set -vx as above.
3) Check that all referenced directories and the fluent command is visible across all nodes on the cluster.

If these don't work you'll have to post the error log showing the output from the set -vx so that we have a chance of seeing which line is failing.

Last edited by J Martin Rushton; 01-15-2015 at 06:15 AM. Reason: Accidental press of the tab key!
 
Old 01-15-2015, 06:39 AM   #7
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 9,905

Rep: Reputation: 2921Reputation: 2921Reputation: 2921Reputation: 2921Reputation: 2921Reputation: 2921Reputation: 2921Reputation: 2921Reputation: 2921Reputation: 2921Reputation: 2921
^M means you have dos EOL characters, so you need to remove them. There is a command dos2unix to do that.
 
Old 01-15-2015, 07:34 AM   #8
tejakalva
LQ Newbie
 
Registered: Jan 2015
Posts: 4

Original Poster
Rep: Reputation: Disabled
The PBS was given to me in our college website so there only the bare command "fluent" is given.
I wrote the following code in Notepad and saved it as "fluentpl.cmd" on my windows desktop PC.
I ran the commamd "qsub fluentpl.cmd" from SSH secure shell after uploading my files to the remote cluster.

I am getting the same error again as
"/bin/bash: : No such file or directory"

This is the PBS script file. I am attaching the screen shot of the error message.

#! /bin/bash
#PBS -o logfile.log
#PBS -e errorfile.err
#PBS -l cput=740:00:00
#PBS -l select=2:ncpus=8
set -vx
tpdir=`echo $PBS_JOBID | cut -f 1 -d .`
tempdir=$HOME/work/job$tpdir
mkdir -p $tempdir
cd $tempdir
cp -R $PBS_O_WORKDIR/* .
fluent 2ddp -g -t16 -pib -cnf=$PBS_NODEFILE -ssh -i srik.jou >> out
mv ../job$tpdir $PBS_O_WORKDIR/
Attached Thumbnails
Click image for larger version

Name:	Error Message.JPG
Views:	24
Size:	146.7 KB
ID:	17362  
 
Old 01-15-2015, 08:26 AM   #9
J Martin Rushton
Member
 
Registered: Jan 2015
Location: England
Distribution: Mainly CentOS
Posts: 31

Rep: Reputation: Disabled
pan64 was spot on with the ^M character, I must confess I'd assumed it was a transcription artefact. You confirmed it with your reference to Notepad. way back when DOS was first written they tried to avoid using a proper print driver (think one 5.25" floppy and no hard drive) by using <carriage return><line feed> to mark the end of text lines. The rest of the known (well, to me at least) universe uses a simple <line feed> as a delimeter and let the print driver add carriage control as required. The upshot of this is that text files are not portable between the M$ and *nix worlds without dos2unix and unix2dos programs.

Can you ssh onto the Linux host and issue the command:
Code:
$ command -v fluent
You will see the actual physical path IF it can be found. It ought to be something like /usr/local/bin/fluent or /opt/fluent/fluent. Use that in the script.

I'm having to read this on a winbox and I'm not seeing your screenshots. Cut-and-paste is far easier for others to read.

You'll probably need to cut-and-paste the script into an editor on the *nix box. Don't bother with Notepad again, it'll never work properly for this task. The quickest to learn is vi, but it is pretty basic. On the plus side once learnt it ought to be on every *nix box you come across.
 
Old 01-15-2015, 08:49 AM   #10
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 9,905

Rep: Reputation: 2921Reputation: 2921Reputation: 2921Reputation: 2921Reputation: 2921Reputation: 2921Reputation: 2921Reputation: 2921Reputation: 2921Reputation: 2921Reputation: 2921
you may try:
qsub dos2unix fluentpl.cmd
(only once)
and afterward qsub fluentpl.cmd should work.
 
Old 01-20-2015, 02:30 PM   #11
tejakalva
LQ Newbie
 
Registered: Jan 2015
Posts: 4

Original Poster
Rep: Reputation: Disabled
Thank you all for the help ..It is running..

One more question..In the below script I am requesting a huge wall time in the cluster so i am getting a message like

"qsub: Job rejected by all possible destinations"
Is it possible to somehow overcome this problem so that my file runs in the cluster as soon as possible like making it a priority file or routing it or something

#! /bin/bash
#PBS -o logfile.log
#PBS -e errorfile.err
#PBS -l cput=740:00:00
#PBS -l select=2:ncpus=8
set -vx
tpdir=`echo $PBS_JOBID | cut -f 1 -d .`
tempdir=$HOME/work/job$tpdir
mkdir -p $tempdir
cd $tempdir
cp -R $PBS_O_WORKDIR/* .
fluent 2ddp -g -t16 -pib -cnf=$PBS_NODEFILE -ssh -i srik.jou >> out
mv ../job$tpdir $PBS_O_WORKDIR/
 
Old 01-21-2015, 04:51 AM   #12
J Martin Rushton
Member
 
Registered: Jan 2015
Location: England
Distribution: Mainly CentOS
Posts: 31

Rep: Reputation: Disabled
First, cput is CPU time; the total across all processors. You need walltime if you really mean wall time.

Second, in the absence of further information the message indicates that no part of your cluster will accept such a large CPU request. You need to talk to your system administrator to determine the best way forward. Without sysadmin assistance the only thing you can do is to try and split the job into smaller parts.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] bash: /usr/local/bin/xdsi: /usr/bin/wish: bad interpreter: No such file or directory Berwhale Linux - Newbie 2 09-15-2011 03:59 PM
execv("/bin/bash") failed system error: No such file or directory bbrian017 Linux - Desktop 1 08-27-2011 02:05 PM
bash: /usr/bin/localedef: No such file or directory satimis Linux From Scratch 2 07-28-2005 02:53 AM
bin/bash:usr/bin/lpr NO SUCH FILE OR DIRECTORY Adibe_Hamm Linux - Newbie 3 10-14-2003 03:30 AM
linux command error message bash: /usr/bin/find: No such file or directory sundaram123 Linux - General 8 04-02-2002 08:18 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:57 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration