Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
1,433 Views

Unable to submit a job using Terminal

I have followed the basic job submission tutorial and created a file named myjob.txt in the server. Then added these two lines in myjob.txt file using a text editor.

 

cd $PBS_O_WORKDIR python final.py

Then I executed the command "qsub myjob.txt" and a job id returned. After that, I executed the command "qstat" and it returned with the job id of the jupyterhub. Also two new blank files also created in the directory - myjob.txt.o4489 and myjob.txt.e4489. What am I doing wrong here?

 

 

64b0379660d5cba5b10d6752b4f6ed1f.png

Tags (4)
0 Kudos
4 Replies
30 Views

Hi Toqi,

 

Thanks for reaching out to us. 

Please follow the steps mentioned below to submit the job

 

1. Create a file named as myjob

vi myjob

2. Open the file and add the following commands

  #If you want to run the job for 24hrs add the command mentioned below (include #)

#PBS -l walltime=24:00:00        

#PBS -l nodes=1

cd $PBS_O_WORKDIR

#Activate your environment using the command below

source activate <ENV_NAME>

#Redirect to the working directory

cd <DIRECTORY PATH>

python <YOUR PYTHON NAME>.py

 

 

Please find the attached sample file. It would be great if you can share the observation once you are done.

 

 

 

Since you are getting both the object file and error file as blank, Please try to execute the code directly in a compute node (not as a job) and share the observation.

 

1. Get a compute node

qsub -I

2. Redirect to the working directory

cd <DIRECTORY PATH>

3. Execute the code as

python final.py

 

 

 

0 Kudos
Highlighted
30 Views

Hi Toqi, Thanks for reaching out to us. Please follow the steps mentioned below to submit the job 1. Create a file named as myjob vi myjob 2. Open the file and add the following commands #If you want to run the job for 24hrs add the command mentioned below (include #) #PBS -l walltime=24:00:00 #PBS -l nodes=1 cd $PBS_O_WORKDIR #Activate your environment using the command below source activate <ENV_NAME> #Redirect to the working directory cd <DIRECTORY PATH> python <YOUR PYTHON NAME>.py Please find the attached sample file. It would be great if you can share the observation once you are done. Since you are getting both the object file and error file as blank, Please try to execute the code directly in a compute node (not as a job) and share the observation. 1. Get a compute node qsub -I 2. Redirect to the working directory cd <DIRECTORY PATH> 3. Execute the code as python final.py Thanks & Regards Ratheesh A
0 Kudos
Highlighted
30 Views

Hi, Could you please confirm whether the solution provided worked for you or not. Thanks Ratheesh A
0 Kudos
Highlighted
30 Views

Hi, Hope the solution provided worked for you. Feel free to raise new thread for any further issues. Thanks Ratheesh A
0 Kudos