I noticed that sometimes if the application run is interrupted (e.g. Ctrl-C'd), it leaves behind some of this processes (mpiexec.hydra, or python, etc). I discovered it while playing with a Singularity image of NGC GAMESS container, but it is definitely not limited to it.
Here's a simple reproduction using RAPIDS AI interactive example:
$ module use ngc-container-environment-modules
$ module load rapidsai/0.17
$ jupyter notebook --ip 0.0.0.0 --no-browser --notebook-dir /rapids/notebooks
.... Jupyter starts ....
.... I can open the browser, use the notebook, everything's great ....
Now if I hit Ctrl-C, everything shuts down as expected and I get my prompt back.
But there are ghosts left behind:
$ ps uxww | grep '[c]onda'
lev 190040 0.5 0.0 2675596 86400 pts/105 S 20:09 0:02 /opt/conda/envs/rapids/bin/python3.7 /opt/conda/envs/rapids/bin/jupyter-lab --allow-root --ip=0.0.0.0 --no-browser --NotebookApp.token=
Changing container_launch definition to be ..... run --nv --pid ......
fixes the problem and eliminates ghost processes. Our singularity is 3.6.4... not sure how this play on other versions.
I noticed that sometimes if the application run is interrupted (e.g. Ctrl-C'd), it leaves behind some of this processes (mpiexec.hydra, or python, etc). I discovered it while playing with a Singularity image of NGC GAMESS container, but it is definitely not limited to it.
Here's a simple reproduction using RAPIDS AI interactive example:
Now if I hit Ctrl-C, everything shuts down as expected and I get my prompt back.
But there are ghosts left behind:
Changing
container_launchdefinition to be..... run --nv --pid ......fixes the problem and eliminates ghost processes. Our singularity is 3.6.4... not sure how this play on other versions.