Score:0

jobs shows nothing even with processes running in the background

jp flag

I ran this script that runs several processes in parallel

./train-eyecnn.sh 9 0.1 0 "key_relative_gaze" | tee "../tmp/9_0.1_0.txt" & 
./train-eyecnn.sh 9 0 0 "key_relative_gaze" | tee "../tmp/9_0_0.txt" &
./train-eyecnn.sh 9 0.1 1 "key_relative_gaze" | tee "../tmp/9_0.1_1.txt" &
./train-eyecnn.sh 9 0 1 "key_relative_gaze" | tee "../tmp/9_0_1.txt" &

wait
echo "All complete"

However, typing jobs shows nothing. I have checked that the monitor setting is set to on. How can I fix this?

haziq@blender:~$ set -o
allexport       off
braceexpand     on
emacs           on
errexit         off
errtrace        off
functrace       off
hashall         on
histexpand      on
history         on
ignoreeof       off
interactive-comments    on
keyword         off
monitor         on
noclobber       off
noexec          off
noglob          off
nolog           off
notify          off
nounset         off
onecmd          off
physical        off
pipefail        off
posix           off
privileged      off
verbose         off
vi              off
xtrace          off

Here are my 4 processes through nvidia-smi

+---------------------------------------------+
| NVIDIA-SMI 418.67       Driver Version: 418.67       CUDA Version: 10.1     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce RTX 208...  On   | 00000000:01:00.0 Off |                  N/A |
| 27%   32C    P8    20W / 250W |     11MiB / 10986MiB |      0%      Default |
+-------------------------------+----------------------+----------------------+
|   1  TITAN V JHH Spe...  On   | 00000000:02:00.0 Off |                  N/A |
| 36%   53C    P2    44W / 250W |   4960MiB / 32478MiB |      0%      Default |
+-------------------------------+----------------------+----------------------+

+---------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|    1     16399      C   ...ample_global_optical_flow_test_sequence   309MiB |
|    1     27324      C   python                                      1155MiB |
|    1     27325      C   python                                      1163MiB |
|    1     27326      C   python                                      1165MiB |
|    1     27327      C   python                                      1157MiB |
+---------------------------------------------+
hr flag
AFAIK when you use `&` in a *script*, you're putting processes into the background of the script's shell, rather than that of your current interactive shell.
Kong avatar
jp flag
@steeldriver sorry but i am very new to this. Do you mean its not possible to terminate the process then?
hr flag
You can terminate them using their PID rather than their job number - either directly, like `kill 27324`, or indirectly using `pkill` for example
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.