# Pbs script completes but gives no output

**URL:** <https://community.openpbs.org/t/pbs-script-completes-but-gives-no-output/2918>\
**Category:** Users/Site Administrators\
**Created:** [December 27, 2021, 6:12pm UTC](https://community.openpbs.org/t/pbs-script-completes-but-gives-no-output/2918 "2021-12-27T18:12:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![faker](https://avatars.discourse-cdn.com/v4/letter/f/eb9ed0/32.png) [@faker](https://community.openpbs.org/u/faker)\
**Post date:** [December 27, 2021, 6:12pm UTC](https://community.openpbs.org/t/pbs-script-completes-but-gives-no-output/2918/1 "2021-12-27T18:12:10Z")

</div>

after installed openpbs, i want to check whether it is installed successfully with the following script

> #PBS -S /bin/bash  
> #PBS -N job1  
> #PBS -l nodes=1:ppn=8
> 
> export PATH=$PBS\_O\_PATH  
> sleep 100  
> pwd \> hello.txt

this job can be submitted successfully to the queue, as showed by qstat

> [node01@node01 test2]$ qstat -a
> 
> node01:  
> Req’d Req’d Elap  
> Job ID Username Queue Jobname SessID NDS TSK Memory Time S Time
> 
> * * *
> 
> 23.node01 node01 batch job1 16676 1 8 – 01:00:00 C

but my problem is it seems that  
pwd\>hello.txt  
did not work as there is no hello.txt file generated.

Meanwhile, job1.e23 and job1.o23 are generated but both of these two files are empty. This really puzzles me, so i come here for some help. Thanks!

ps: below is the screen output of qstat -f jobid

> Job Id: 23.node01  
> Job\_Name = job1  
> Job\_Owner = node01@node01  
> resources\_used.cput = 00:00:00  
> resources\_used.energy\_used = 0  
> resources\_used.mem = 2924kb  
> resources\_used.vmem = 338868kb  
> resources\_used.walltime = 00:01:41  
> job\_state = C  
> queue = batch  
> server = node01  
> Checkpoint = u  
> ctime = Mon Dec 27 16:38:01 2021  
> Error\_Path = node01:/home/node1/test2/job1.e23  
> exec\_host = node01/0-7  
> Hold\_Types = n  
> Join\_Path = n  
> Keep\_Files = n  
> Mail\_Points = a  
> mtime = Mon Dec 27 16:39:42 2021  
> Output\_Path = node01:/home/node1/test2/job1.o23  
> Priority = 0  
> qtime = Mon Dec 27 16:38:01 2021  
> Rerunable = True  
> Resource\_List.nodes = 1:ppn=8  
> Resource\_List.nodect = 1  
> Resource\_List.walltime = 01:00:00  
> session\_id = 16676  
> Shell\_Path\_List = /bin/bash  
> Variable\_List = PBS\_O\_QUEUE=batch,PBS\_O\_HOME=/home/node1,  
> PBS\_O\_LOGNAME=node01,  
> PBS\_O\_PATH=/opt/intel/oneapi/clck/2021.1-beta10/bin/intel64:/opt/inte  
> l/oneapi/intelpython/latest/bin:/opt/intel/oneapi/intelpython/latest/c  
> ondabin:/opt/intel/oneapi/mpi/2021.1-beta10/libfabric/bin:/opt/intel/o  
> neapi/mpi/2021.1-beta10/bin:/opt/intel/oneapi/dpcpp-ct/2021.1.1/bin:/o  
> pt/intel/oneapi/vtune/2021.1.1/bin64:/opt/intel/oneapi/mkl/latest/bin/  
> intel64:/opt/intel/oneapi/compiler/2021.1-beta10/linux/lib/oclfpga/llv  
> m/aocl-bin:/opt/intel/oneapi/compiler/2021.1-beta10/linux/lib/oclfpga/  
> bin:/opt/intel/oneapi/compiler/2021.1-beta10/linux/bin/intel64:/opt/in  
> tel/oneapi/compiler/2021.1-beta10/linux/bin:/opt/intel/oneapi/compiler  
> /2021.1-beta10/linux/ioc/bin:/opt/intel/oneapi/dev-utilities/2021.1-be  
> ta10/bin:/usr/local/torque/bin:/usr/local/torque/sbin:/usr/local/bin:/  
> usr/bin:/usr/local/sbin:/usr/sbin:/Programs/Torque/bin:/Programs/Torqu  
> e/sbin:/home/node1/.local/bin:/home/node1/bin,  
> PBS\_O\_MAIL=/var/spool/mail/node01,PBS\_O\_SHELL=/bin/bash,  
> PBS\_O\_LANG=en\_US.UTF-8,PBS\_O\_WORKDIR=/home/node1/test2,  
> PBS\_O\_HOST=node01,PBS\_O\_SERVER=node01  
> euser = node01  
> egroup = node1  
> queue\_type = E  
> comment = Job started on Mon Dec 27 at 16:38  
> etime = Mon Dec 27 16:38:01 2021  
> exit\_status = 0  
> submit\_args = job1  
> start\_time = Mon Dec 27 16:38:01 2021  
> start\_count = 1  
> fault\_tolerant = False  
> comp\_time = Mon Dec 27 16:39:42 2021  
> job\_radix = 0  
> total\_runtime = 100.249841  
> submit\_host = node01  
> init\_work\_dir = /home/node1/test2

---

<div class="post-metadata">

**Author:** ![dtalcott](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.openpbs.org/dtalcott/32/410_2.png) [@dtalcott](https://community.openpbs.org/u/dtalcott)\
**Post date:** [December 27, 2021, 10:01pm UTC](https://community.openpbs.org/t/pbs-script-completes-but-gives-no-output/2918/2 "2021-12-27T22:01:36Z")

</div>

Did you check for hello.txt in your $HOME directory? A PBS job starts in $HOME. You can put a

` cd $PBS_O_WORKDIR`

in your script to change to the directory where the job was submitted.

---

<div class="post-metadata">

**Author:** ![faker](https://avatars.discourse-cdn.com/v4/letter/f/eb9ed0/32.png) [@faker](https://community.openpbs.org/u/faker)\
**Post date:** [December 28, 2021, 8:56am UTC](https://community.openpbs.org/t/pbs-script-completes-but-gives-no-output/2918/3 "2021-12-28T08:56:40Z")

</div>

Thanks mate! It works.
