Intel® DevCloud
Help for those needing help starting or connecting to the Intel® DevCloud

qsub output empty?

couto__carlos
Beginner
3,031 Views

Hi,

A simple script job file (myjob):

cd $PBS_O_WORKDIR
python teste.py

the contents of teste.py:

print('ola')

when I run

>qsub myjob

the contents of output of job file:
########################################################################
#      Date:           Thu May 14 10:47:48 PDT 2020
#    Job ID:           596007.v-qsvr-1.aidevcloud
#      User:           u40563
# Resources:           neednodes=1:batch:ppn=2,nodes=1:batch:ppn=2,walltime=06:00:00
########################################################################


########################################################################
# End of output for job 596007.v-qsvr-1.aidevcloud
# Date: Thu May 14 10:47:52 PDT 2020
########################################################################


what is wrong here? It seems that python code is not executed.

Thanks in advance.
 

0 Kudos
15 Replies
ChithraJ_Intel
Moderator
3,031 Views

Hi,

Thanks for reaching out to us.
We tried to follow the steps shared by you in Devcloud. We didn't observe any issue as you said and the python file gets executed successfully.(Please refer to the below output we got). It would be better if you share the error file generated (eg: myjob.exxxxx) with us. 


########################################################################
#      Date:           Fri May 15 01:04:06 PDT 2020
#    Job ID:           596581.v-qsvr-1.aidevcloud
#      User:           uXXXXX
# Resources:           neednodes=1:batch:ppn=2,nodes=1:batch:ppn=2,walltime=06:00:00
########################################################################

ola

########################################################################
# End of output for job 596581.v-qsvr-1.aidevcloud
# Date: Fri May 15 01:04:07 PDT 2020
########################################################################

Thanks.

0 Kudos
couto__carlos
Beginner
3,031 Views

Hi,

I tried again today. The myjob.e596662 file contents:

/var/spool/torque/mom_priv/jobs/596662.v-qsvr-1.aidevcloud.SC: line 2: /home/u40563: Is a directory
 

The output file contents:


########################################################################
#      Date:           Fri May 15 03:37:09 PDT 2020
#    Job ID:           596662.v-qsvr-1.aidevcloud
#      User:           u40563
# Resources:           neednodes=1:batch:ppn=2,nodes=1:batch:ppn=2,walltime=06:00:00
########################################################################


########################################################################
# End of output for job 596662.v-qsvr-1.aidevcloud
# Date: Fri May 15 03:37:12 PDT 2020
########################################################################

0 Kudos
ChithraJ_Intel
Moderator
3,031 Views

Hi Carlos,

We tried to submit a job script with the same steps you followed in two different devcloud account. We couldn't observe the issue that you faced. So, we will inform this to concerned team and get back to you soon.

Thanks.

0 Kudos
couto__carlos
Beginner
3,031 Views

Yes, I can confirm this is duplicate because I didn't find the original thread in the forum so I tried to post again. Also, I can't use the search function from the forum, it does not search the forum but the whole intel.com domain instead. Thanks.

0 Kudos
couto__carlos
Beginner
3,031 Views

Are there any updates to this issue? You can reset my account I don't have any sensitive files and I would be very happy to submit queue jobs. Thank you.

0 Kudos
ChithraJ_Intel
Moderator
3,031 Views

Hi Carlos,

We have informed your issue to the Devcloud admin team and awaiting for the response from them. We will give you the updates soon. And we have also closed your duplicated thread.

Thanks.

0 Kudos
ChithraJ_Intel
Moderator
3,031 Views

Hi Carlos,

We are forwarding your case for SME to check, since we couldn't reproduce the issue.

0 Kudos
ChithraJ_Intel
Moderator
3,031 Views

Hi Carlos,

While checking the issue internally, it doesn't seem to be an account issue since you are able to do qsub without any problems.The issue might be in the scripts. Could you please try with the attached job file and python script.[Note: Please copy-paste the content instead of typing]. The results we got:

(base) uXXXX@s001-n049:~/forum_job$ qsub myjob
600167.v-qsvr-1.aidevcloud
(base) uXXXX@s001-n049:~/forum_job$ ls
myjob  myjob.e600167  myjob.o600167  teste.py
(base) uXXXX@s001-n049:~/forum_job$ cat myjob.o600167

########################################################################
#      Date:           Tue May 19 23:59:31 PDT 2020
#    Job ID:           600167.v-qsvr-1.aidevcloud
#      User:           uXXXX 
# Resources:           neednodes=1:batch:ppn=2,nodes=1:batch:ppn=2,walltime=24:00:00
########################################################################

Hello world!!!

########################################################################
# End of output for job 600167.v-qsvr-1.aidevcloud
# Date: Tue May 19 23:59:32 PDT 2020
########################################################################
 

0 Kudos
ChithraJ_Intel
Moderator
3,031 Views

Hi Carlos,

Please let me know from where you are doing the job submission,is that from login node or compute node?

0 Kudos
couto__carlos
Beginner
3,031 Views

Hi,

Thanks for your help. The problem remains and I still get no output.

I am launching qsub from the computer node:

u40563@s001-n002:~$ qsub newjob
600931.v-qsvr-1.aidevcloud

########################################################################
#      Date:           Thu May 21 07:42:23 PDT 2020
#    Job ID:           600931.v-qsvr-1.aidevcloud
#      User:           u40563
# Resources:           neednodes=1:batch:ppn=2,nodes=1:batch:ppn=2,walltime=24:00:00
########################################################################


########################################################################
# End of output for job 600931.v-qsvr-1.aidevcloud
# Date: Thu May 21 07:42:26 PDT 2020
########################################################################
 

0 Kudos
ChithraJ_Intel
Moderator
3,031 Views

Hi Carlos,

Thanks for your response. We have informed this to concerned team and will get back to you with the updates soon.

0 Kudos
Dan_P_Intel
Employee
3,031 Views

Hi,

I think I might have an idea what's going on.
In short, this appears to be related to assumptions made when implementing and running the script, assumptions that are incorrect.

In the original post the job script does the following:

cd $PBS_O_WORKDIR
python teste.py

However, neither environment variables nor CWD are inherited when the job is submitted to the cluster.
It is safer to always be as explicit as possible in the job script and/or invocation of the qsub utility.

Here's how I did my test:

# the python script, aka the job
$ cat test.py
print("Hello World!")
# the job script, aka what gets submitted to the cluster using qsub
$ cat test.sh
#!/bin/bash
python test.py
# the submission to the cluster
$ qsub -d . test.sh

Please note that I used the "-d ." argument when calling the qsub utility. This argument preserves the CWD so that test.sh can find test.py.

I recommend using the simple pattern I described above in order to avoid failures in the future.

 

That being said, let's explore what happens when I submit a job script that points to a non-existent python script.

# the incorrect job script
$ cat test.sh
#!/bin/bash
python nonexistent.py

In such a case, the output (stdout) of the job script will look exactly like you described. The stderr of the job script will report something like this:

python: can't open file 'nonexistent.py': [Errno 2] No such file or directory

 

Please let us know if this solves your problem.

Thanks! ;)

0 Kudos
ChithraJ_Intel
Moderator
3,031 Views

Hi Carlos,

Could you please confirm whether the above solution worked for you?

0 Kudos
couto__carlos
Beginner
3,031 Views

Hi,

Thanks for the help it is now working.

Regards,

Carlos

0 Kudos
ChithraJ_Intel
Moderator
3,031 Views

Hi Carlos,

Thanks for the confirmation. We are closing the case. Please feel free to raise a new thread if you have any further issues.

0 Kudos
Reply