#!/bin/bash #SBATCH -c 8 # number of cores, here are 8 requested. #SBATCH --mail-type=END,FAIL # email status changes # diagnostic information # display node name echo "nodename :" hostname # check if gpu are assigned, if not create empty list if [ -z "$CUDA_VISIBLE_DEVICES" ]; then export CUDA_VISIBLE_DEVICES="" fi # display which gpu's we are allowed to use echo "CUDA_VISIBLE_DEVICES = '"$CUDA_VISIBLE_DEVICES"'" # run tensorflow echo "Starting Tensorflow: " python3 mycode.py