# Job not getting distributed among nodes

**URL:** https://community.openpbs.org/t/job-not-getting-distributed-among-nodes/3097
**Category:** Users/Site Administrators
**Created:** [May 19, 2022, 11:39am UTC](https://community.openpbs.org/t/job-not-getting-distributed-among-nodes/3097 "2022-05-19T11:39:10Z")
**Posts on this page:** 1
**Showing post:** 17

<div class="post-metadata">

### Author: ![adarsh](https://avatars.discourse-cdn.com/v4/letter/a/f07891/32.png) [@adarsh](https://community.openpbs.org/u/adarsh)
#### Post date: [May 23, 2022, 7:06pm UTC](https://community.openpbs.org/t/job-not-getting-distributed-among-nodes/3097/17 "2022-05-23T19:06:15Z")

</div>

Please try this script (kind of induced parallelism)

```auto
#cat stress.sh

#PBS -N stress
#PBS -l select=2:ncpus=4:mpiprocs=4
cd $PBS_O_WORKDIR
total_cores=`cat $PBS_NODEFILE | wc -l `
echo "total_cores=$total_cores"
total_hosts=`cat $PBS_NODEFILE | uniq | wc -l`
echo "total_hosts=$total_hosts"
cores_per_host=$((total_cores / total_hosts))
echo "cores_per_host=$cores_per_host"
echo "running stress"
echo "/opt/pbs/bin/pbsdsh -- stress --cpu $cores_per_host --timeout 100s"
/opt/pbs/bin/pbsdsh -- stress --cpu $cores_per_host --timeout 100s
echo "ending stress"

#qsub stress.sh

```

---

_[View the full topic](https://community.openpbs.org/t/job-not-getting-distributed-among-nodes/3097)._
