Skip to content

Unable to start training and low-to-none GPU usage on cluster #2232

Closed as not planned

Description

@anthonyylee

Is there an existing issue for this?

  • I have searched the existing issues

Bug description

The execution hangs right after GPU device creation when executed deeplabcut.train_network(path_config_file, shuffle=1, displayiters=1, saveiters=5, maxiters=100). (I intentionally scaled the value down to attempt to have the job start displaying each training iteration).

image

Expects:
Expecting to see the unhighlighted section , especially the "iteration, loss, lr` displays.
image

Operating System

Operating System: CentOS Linux 8
CPE OS Name: cpe:/o:centos:centos:8
Kernel: Linux 4.18.0-240.15.1.el8_3.x86_64
Architecture: x86-64

DeepLabCut version

DLC v2.3.4

DeepLabCut mode

single animal

Device type

  • CPU: 2 AMD EPYC 7502 32 core (only provisioned 8 cores for the job)
  • GPU: Nvidia Tesla T100 (40GB)
    • Nvidia Driver Version: 460.32.03
    • CUDA Version: 11.2

image

Steps To Reproduce

  1. Ensure Nvidia driver and CUDA version are installed and matching the TensorFlow v2.8 requirements
  2. git clone https://github.com/DeepLabCut/DeepLabCut.git, and Conda install using the yaml requirement file.
  3. Ensure that environ var $LD_LIBRARY_PATH is pointing to all the needed libraries for TF, and $DLClight == True
  4. conda activate DEEPLABCUT
  5. Run python
  6. In python run import tensorflow as tf and tf.config.list_physical_devices("GPU") to make sure that TF does find the GPU.
  7. exit() and run python again
  8. In 'pythonrunimport deeplabcut`
  9. In python run path_config_file = '/data001/projects/leean9/DeepLabCut/examples/openfield-Pranav-2018-10-30/config.yaml
  10. In python run deeplabcut.load_demo_data(path_config_file)
  11. In python run deeplabcut.train_network(path_config_file, shuffle=1, displayiters=1, saveiters=5, maxiters=100)

Relevant log output

(DEEPLABCUT) bash-4.4$ nvidia-smi                                                                                                    Thu May  4 15:22:28 2023                                                                                                             +-----------------------------------------------------------------------------+                                                      | NVIDIA-SMI 460.32.03    Driver Version: 460.32.03    CUDA Version: 11.2     |                                                      |-------------------------------+----------------------+----------------------+                                                      | GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |                                                      | Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |                                                      |                               |                      |               MIG M. |                                                      |===============================+======================+======================|                                                      |   0  A100-PCIE-40GB      On   | 00000000:01:00.0 Off |                    0 |                                                      | N/A   32C    P0    35W / 250W |      0MiB / 40536MiB |      0%      Default |                                                      |                               |                      |             Disabled |                                                      +-------------------------------+----------------------+----------------------+                                                      |   1  A100-PCIE-40GB      On   | 00000000:A1:00.0 Off |                    0 |                                                      | N/A   34C    P0    37W / 250W |      0MiB / 40536MiB |      0%      Default |                                                      |                               |                      |             Disabled |                                                      +-------------------------------+----------------------+----------------------+                                                                                                                                                                                           +-----------------------------------------------------------------------------+                                                      | Processes:                                                                  |                                                      |  GPU   GI   CI        PID   Type   Process name                  GPU Memory |                                                      |        ID   ID                                                   Usage      |                                                      |=============================================================================|                                                      |  No running processes found                                                 |                                                      +-----------------------------------------------------------------------------+                                                      (DEEPLABCUT) bash-4.4$ nvcc -V                                                                                                       nvcc: NVIDIA (R) Cuda compiler driver                                                                                                Copyright (c) 2005-2021 NVIDIA Corporation                                                                                           Built on Thu_Jan_28_19:32:09_PST_2021                                                                                                Cuda compilation tools, release 11.2, V11.2.142                                                                                      Build cuda_11.2.r11.2/compiler.29558016_0       
                                                                                     (DEEPLABCUT) bash-4.4$ pip list | grep -E 'nvidia|tensor|deeplab|gcc'                                                                deeplabcut                    2.3.4                                                                                                  napari-deeplabcut             0.1.2                                                                                                  nvidia-cublas                 11.5.1.101                                                                                             nvidia-cublas-cu12            12.1.3.1                                                                                               nvidia-cuda-nvrtc             11.1.105                                                                                               nvidia-cuda-runtime           11.3.58                                                                                                nvidia-cuda-runtime-cu12      12.1.105                                                                                               nvidia-cudnn                  8.2.0.51                                                                                               nvidia-cudnn-cu12             8.9.0.131                                                                                              nvidia-tensorrt               7.2.3.4                                                                                                tensorboard                   2.8.0                                                                                                  tensorboard-data-server       0.6.1                                                                                                  tensorboard-plugin-wit        1.8.1                                                                                                  tensorflow                    2.8.4                                                                                                  tensorflow-estimator          2.8.0                                                                                                  tensorflow-io-gcs-filesystem  0.32.0                                                                                                 tensorpack                    0.11                                                                                                   tensorrt                      8.6.1                                                                                                  tensorrt-bindings             8.6.1                                                                                                  tensorrt-libs                 8.6.1  
                                                                                                (DEEPLABCUT) bash-4.4$ gcc --version                                                                                                 gcc (GCC) 9.2.1 20191120 (Red Hat 9.2.1-2)                                                                                           Copyright (C) 2019 Free Software Foundation, Inc.                                                                                    This is free software; see the source for copying conditions.  There is NO                                                           warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Anything else?

This is the nvidia-smi output, and as you one can see only about 500-800 MB is being used and 0% utilization.
image

Thank you for taking the time, I've tried to search through SO and various forums/documentations and had to downgrade the from TF v2.10 to v2.8 due to the GCC requirements (I have GCC v9.2 and TF v2.10 requires GCC v9.3) so to resolve some of the error messages. Perhaps the Conda checks didn't catch it?

**Update 2023-05-04 21:34 UTC - **
Seems like the code output format got messed up, thus here is a screenshot.
image

Code of Conduct

Activity

  1. DianaY-J commented on May 11, 2023

    @DianaY-J

    Hi,

    @LWitter and I met a similar problem this week, and we found it's an issue with the size of input image. Our solution is attached below:

    image

  2. anthonyylee commented on May 11, 2023

    @anthonyylee
    ContributorAuthor

    @DianaY-J , thank you for your input!
    The result I am experiencing is actually with the demo data that is provided in in the DLC github repo (under examples directory and specifically the openfield-Pranav-2018-10-30 example). After successfully running this demo on Colab, I was trying to run it on my cluster.

    Recently, we are suspecting that it might be something on the cluster's end because the Python process on the cluster when we ran top shows 0.0~0.3% CPU usage (for reference, top fluctuates around the same CPU usage percentage) yet the same Python process is using about 20GB of memory.

    image

  3. n-poulsen commented on May 26, 2023

    @n-poulsen
    Contributor

    Hi @aoot, I have seen that issue and the underlying cause was often a problem with permissions where the code is running (e.g., you don't have access to write to the folder where the initial weights are being downloaded). Could you check that you have full read/write rights?

  4. anthonyylee commented on Jun 14, 2023

    @anthonyylee
    ContributorAuthor

    I presume so being that I was working out of my home directory which I do have full read/write.
    Unless the initial weights are downloaded to somewhere else?

    How may I check this?

  5. n-poulsen commented on Jun 15, 2023

    @n-poulsen
    Contributor

    The initial weights are downloaded to your where DeepLabCut is installed (which is, if you use conda/miniconda, in the miniconda3/envs/YOUR_ENVIRONMENT folder).

    You can check the path where the initial weights are in the dlc-models/.../train/pose_cfg.yaml file.

  6. anthonyylee commented on Jun 15, 2023

    @anthonyylee
    ContributorAuthor

    Yeah, I do have both read/write permission into this folder.
    Does DLC utilize IPython during runs (even with headless mode)?

  7. jeylau commented on Jun 19, 2023

    @jeylau
    Contributor

    Hi @aoot, could it be that your images are pretty large (i.e., w/ sides larger than 1500 pixels)?

  8. anthonyylee commented on Jun 25, 2023

    @anthonyylee
    ContributorAuthor

    Doesn't seem like the case because this is the result from running on the demo data provided in the repo.

  9. n-poulsen commented on Jun 26, 2023

    @n-poulsen
    Contributor

    From the TensorFlow compatibility charts, it seems that TF 2.8 is compatible with CUDA 11.2 but cuDNN 8.1. You seem to have cuDNN 8.2 installed (maybe nvidia-cudnn-cu112 is the wrong version as well?).

    Maybe downgrading cuDNN is the solution?

  10. anthonyylee commented on Jun 28, 2023

    @anthonyylee
    ContributorAuthor

    I'll give it a shot and report back~

  11. n-poulsen commented on Jul 20, 2023

    @n-poulsen
    Contributor

    Closing as stale

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

Metadata

Metadata

Assignees

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