Skip to content

Add '--pid' to the singularity command #4

Description

@lgorenstein

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions