COMP6248 Differentiable Programming (and Deep Learning)

2021-22


Maintained by Dr Kate Farrahi & Dr Jonathon Hare.

The COMP6248 GPU server: yann.ecs.soton.ac.uk

  • We have built a GPU-server for the class to use:
  • Access is via ssh to yann.ecs.soton.ac.uk
    • Your iSolutions home directory will be mounted automatically.
    • You will need to setup your own environment:
      • Download and install miniconda in your home directory
      • Install packages using the conda command (and pip if neccessary).
  • This is a shared resource - please don’t hog it all to yourselves!
    • We will be monitoring usage; this server is only to be used for running code related to this coursework.
      • Bear in mind that you have agreed to abdie by the University Computing Policy; misusing the server for things like bitcoin mining will lead to disiplinary proceedings…
    • Only use the resources that you need (don’t block all GPU memory or use all GPUs if you don’t need them).
      • There are 4 GPUs; by default a single Tensorflow program will allocate all the available memory across all cards (stopping anyone else from using them), even though it doesn’t automatically run code on all cards. This can be fixed as follows:
          import tensorflow as tf
          config = tf.ConfigProto() 
          config.gpu_options.allow_growth=True 
          sess = tf.Session(config=config)
        

        And, if using Keras follow this with:

          import keras.backend.tensorflow_backend as KTF
          KTF.set_session(sess)
        
        • (Note that PyTorch doesn’t have this problem and will only use what it needs)
      • You can force CUDA to only see particular GPUs using the CUDA_VISIBLE_DEVICES environment variable; for example, if you want to run on just the first GPU, then CUDA_VISIBLE_DEVICES=0 python myprogram.py will do the trick. If you have GPU-parallel code, then you can specify multiple GPUs by comma separating IDs: CUDA_VISIBLE_DEVICES=1,2 python myprogram.py
      • You can visualize in real-time the GPU utilization by using watch nvidia-smi
Copyright ©2022 The University of Southampton. All rights reserved.