- A simple note for how to start multi-node-training on slurm scheduler with PyTorch.
- Useful especially when scheduler is too busy that you cannot get multiple GPUs allocated, or you need more than 4 GPUs for a single job.
- Requirement: Have to use PyTorch DistributedDataParallel(DDP) for this purpose.
- Warning: might need to re-factor your own code.
- Warning: might be secretly condemned by your colleagues because using too many GPUs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Written by Andrew McDonough | |
| # Prerequisites: xdotool must be installed and in your path (http://tinyurl.com/xdotool) | |
| # A simple bash script that uses xdotool to move the window that is currently in focus to different parts of the screen. | |
| # Particularly useful for reading web pages with flexible layouts on wide monitors. | |
| # Assign the various options to keyboard shortcuts e.g. '<Super>Left' assigned to 'swind left' | |
| # See http://tinyurl.com/ubuntukeys for help with assigning keyboard shortcuts. | |
| # sudo apt install xdotool |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Sample custom iterator. | |
| // By perfectly.insane (http://www.dreamincode.net/forums/index.php?showuser=76558) | |
| // From: http://www.dreamincode.net/forums/index.php?showtopic=58468 | |
| #include <iostream> | |
| #include <vector> | |
| #include <algorithm> | |
| #include <iterator> | |
| #include <cassert> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # These commands are based on a askubuntu answer http://askubuntu.com/a/581497 | |
| # To install gcc-6 (gcc-6.1.1), I had to do more stuff as shown below. | |
| # USE THOSE COMMANDS AT YOUR OWN RISK. I SHALL NOT BE RESPONSIBLE FOR ANYTHING. | |
| # ABSOLUTELY NO WARRANTY. | |
| # If you are still reading let's carry on with the code. | |
| sudo apt-get update | |
| sudo apt-get install build-essential software-properties-common | |
| sudo add-apt-repository ppa:ubuntu-toolchain-r/test |