# Job dependency when submission host different from server host

**URL:** <https://community.openpbs.org/t/job-dependency-when-submission-host-different-from-server-host/3343>\
**Category:** Users/Site Administrators\
**Created:** [November 2, 2022, 8:31am UTC](https://community.openpbs.org/t/job-dependency-when-submission-host-different-from-server-host/3343 "2022-11-02T08:31:27Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Philippe](https://avatars.discourse-cdn.com/v4/letter/p/f14d63/32.png) [@Philippe](https://community.openpbs.org/u/Philippe)\
**Post date:** [November 2, 2022, 8:31am UTC](https://community.openpbs.org/t/job-dependency-when-submission-host-different-from-server-host/3343/1 "2022-11-02T08:31:27Z")

</div>

Hello People,

I have a problem with Job dependencies, when the submission host ( host where qub is executed ) is not the same as the server host ( host where pbs\_server is running).  
I am using openPBS version 19.1.3 installed by openHPC version 1.3 on a RHEL7.7.  
Testcases:  
Test1: when I submit job on submission host without dependency to other job it works well  
Test2: when I submit jobs on server host with dependency like afterany to parent job, it works well  
Test3: when I submit jobs on submission host with dependency like afterany to parent job, it does not work. Child job remain in Hold status forever, after parent exit.

Question: I there any known bug with this PBS Version ?

Thanks

---

<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:** [November 2, 2022, 10:34pm UTC](https://community.openpbs.org/t/job-dependency-when-submission-host-different-from-server-host/3343/2 "2022-11-02T22:34:39Z")

</div>

Dependency issues are often resolved by using the full jobid in the -W depend= string. That is, when you qsub a job, qsub outputs the jobid. Copy/paste that exact string when forming your depend= values.

If this is not the fix, could you show the dependency information from an example pair of jobs?

```auto
qstat -f running_jobid held_jobid | grep depend

```

---

<div class="post-metadata">

**Author:** ![Philippe](https://avatars.discourse-cdn.com/v4/letter/p/f14d63/32.png) [@Philippe](https://community.openpbs.org/u/Philippe)\
**Post date:** [November 3, 2022, 7:20am UTC](https://community.openpbs.org/t/job-dependency-when-submission-host-different-from-server-host/3343/3 "2022-11-03T07:20:39Z")

</div>

H dtalcott, your tip with full jobid fix my problem.

1. only jobid  
[subhost: ~]$ qstat -f 17 18 | grep -i depend  
depend = beforeany:18.serverhost@serverhost  
depend = [afterany:17.serverhost.fev.com@serverhost.fev.com](mailto:afterany:17.serverhost.fev.com@serverhost.fev.com)  
Submit\_arguments = -I -l select=1:ncpus=1 -W depend=afterany:17

2. jobid + servername where PBS server is running   
[subhost: ~]$ qstat -f 19 20 | grep -i depend  
depend = beforeany:20.serverhost@serverhost  
depend = afterany:19.serverhost@serverhost  
Submit\_arguments = -I -l select=1:ncpus=1 -W depend=afterany:19.serverhost

The difference is the domain name that is automatically attached at the end of the child job. Remark that if I also add the domain name in the afterany clausel ( afterany:19.serverhost.fev.com) , then it does not work. What is the logic ?  
Thanks you very much

---

<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:** [November 3, 2022, 5:19pm UTC](https://community.openpbs.org/t/job-dependency-when-submission-host-different-from-server-host/3343/4 "2022-11-03T17:19:00Z")

</div>

> [@Philippe](#):
>
> Remark that if I also add the domain name in the afterany clausel ( afterany:19.serverhost.fev.com) , then it does not work. What is the logic ?

You probably have a hostname/IP address/pbs.conf mismatch somewhere. Carefully go through the items listed under “Required Name Resolution” and following sections in the Installation and Upgrade Guide. Be sure to use the canonical names in the /etc/pbs.conf files.
