oar-team / oar3

OAR: versatile resource and job manager for cluster (third generation)
Other
8 stars 11 forks source link

Path handling of submission #20

Open Nyk0 opened 2 years ago

Nyk0 commented 2 years ago

Hi,

I have a strange behavior according paths of submission. I wrote an infinite loop in bash that outputs "hi !" every seconds forever :

nico@admin:~/oar$ cat infinite.sh
#!/bin/bash

while true
do
        echo "hi !"
        sleep 5
done

And I wrapped it in an OAR submission script :

nico@admin:~/oar$ cat infinite.oar
#!/bin/bash -l
#OAR -l nodes=1/cpu=2

cd /nfsvol/homes/nico/oar/
./infinite.sh

I'm in oar subdirectory of my home user :

nico@admin:~/oar$ pwd
/nfsvol/homes/nico/oar

Where the two previous files belong.

When I submit the job from this directory, it fails :

nico@admin:~/oar$ oarstat
Job id    S User     Duration          System message
--------- - -------- ----------------- ------------------------------------------------
2         W nico        0:00:00 R=2,W=1:0:0,J=B
nico@admin:~/oar$ oarstat
Job id    S User     Duration          System message
--------- - -------- ----------------- ------------------------------------------------
2         L nico        0:00:00 R=2,W=3660,J=P,Q=default

```console
nico@admin:~/oar$ oarstat
nico@admin:~/oar$

```console
nico@admin:~/oar$ cat ../OAR.2.stderr
/bin/bash: line 1: infinite.oar: command not found

If i go back to my home directory and relaunch it :

nico@admin:~$ oarstat
Job id    S User     Duration          System message
--------- - -------- ----------------- ------------------------------------------------
3         W nico        0:00:00 R=2,W=1:0:0,J=B
nico@admin:~$ oarstat
Job id    S User     Duration          System message
--------- - -------- ----------------- ------------------------------------------------
3         R nico        0:00:02 R=2,W=3660,J=P,Q=default

This time it runs, and the output is good :

nico@admin:~$ cat OAR.3.stdout
hi !
hi !
hi !
hi !
...