| 241 | == Running jobs with GPU == |
| 242 | Discovery has 12 GPU nodes: g01-g12. To submit a job to these nodes, you will need to specify with |
| 243 | {{{ |
| 244 | #!sh |
| 245 | #SBATCH --partition gpuq |
| 246 | #SBATCH --gres=gpu:1 |
| 247 | }}} |
| 248 | where `1` means to use 1 GPU. |
| 249 | |
| 250 | == Use DeepXDE == |
| 251 | |
| 252 | Discovery supports container by a software called `singularity`, see the full document: [https://docs.sylabs.io/guides/3.5/user-guide/index.html] |
| 253 | A precompiled DeepXDE image with `Tensorflow v.2` backend is available at `docker://chenggongdartmouth/deepxde:v1.2` |
| 254 | |
| 255 | Before using this image, you will need to make sure you have |
| 256 | {{{ |
| 257 | {"backend": "tensorflow"} |
| 258 | }}} |
| 259 | in your `~/.deepxde/config.json`. |
| 260 | |
| 261 | The following is an example of using DeepXDE to run a script`./test.py` on discovery: |
| 262 | {{{ |
| 263 | #!sh |
| 264 | #!/bin/bash |
| 265 | #SBATCH --job-name=testDeepxde |
| 266 | #SBATCH --account=ice |
| 267 | #SBATCH -o testdeepxde.outlog |
| 268 | #SBATCH -e testdeepxde.errlog |
| 269 | #SBATCH --nodes=1 |
| 270 | #SBATCH --ntasks-per-node=4 |
| 271 | #SBATCH --time=0-05:00:00 |
| 272 | #SBATCH --mem=32G |
| 273 | #SBATCH --partition gpuq |
| 274 | #SBATCH --gres=gpu:1 |
| 275 | #SBATCH --mail-type=END,FAIL |
| 276 | |
| 277 | cat ./test.py | singularity exec docker://chenggongdartmouth/deepxde:v1.2 python |
| 278 | }}} |
| 279 | |
| 280 | |