Thank you! I've tried your first option and I've obtained the next:
*$ printenv | egrep 'SLURM_|CUDA' | sort* * * *SLURM_JOB_CPUS_PER_NODE=1* *SLURM_JOB_ID=78* *SLURM_JOBID=78* *SLURM_JOB_NODELIST=aic* *SLURM_JOB_NUM_NODES=1* *SLURM_NNODES=1* *SLURM_NODELIST=compute1* *SLURM_SUBMIT_DIR=/home/user* *SLURM_TASKS_PER_NODE=1* Then I've executed your second option: *$ srun -N1 --gres=gpu:2 --mpi=none -l <the_script>* * * *0: CUDA_VISIBLE_DEVICES=0,1* *0: SLURM_CHECKPOINT_IMAGE_DIR=/home/user* *0: SLURM_CPUS_ON_NODE=1* *0: SLURM_DISTRIBUTION=cyclic* *0: SLURM_GTIDS=0* *0: SLURM_JOB_CPUS_PER_NODE=1* . . . This command has worked fine! Now I have the CUDA devices which have been allocated! Thank you! El 17 de febrer de 2012 16:23, Michel Bourget <[email protected]> ha escrit: > > On 02/17/2012 05:23 AM, Sergio Iserte Agut wrote: > > I had already tried: > > > > /$ echo CUDA_VISIBLE_DEVICES/ > > />/ > > > > but I got nothing. > > > > What about > printenv | egrep 'SLURM_|CUDA' | sort > output ? That would be useful ... > > or, better, the same but in a step, but the above in a little script and > do: > srun /-N1 --gres=gpu:2 --mpi=none -l <the_script> > > > / > > > > There are another environment variable? > > > > Regards! > > > > El 17 de febrer de 2012 10:59, Carles Fenoy <[email protected] > > <mailto:[email protected]>> ha escrit: > > > > Hi Sergio, > > > > You can try with the environment variable CUDA_VISIBLE_DEVICES set > > by the gres part of slurmd. > > > > Regards, > > Carles Fenoy > > > > > > On Fri, Feb 17, 2012 at 10:12 AM, Sergio Iserte Agut > > <[email protected] <mailto:[email protected]>> wrote: > > > > Hello, > > I'm wondering if I can show the allocated GPUs such as I can > > show the allocated nodes. > > For instance, we have 1 node, called /compute1/, with 12 CPUs > > and 4 GPUs: > > > > /$ salloc -N1 --gres=gpu:2 bash/ > > /$ echo $SLURM_NODELIST/ > > /> compute1/ > > / > > / > > Which GPUs has been allocated? > > > > Regards! > > / > > / > > / > > / > > > > > > > > > > > > -- > > -- > > Carles Fenoy > > > > > > > -- > > ----------------------------------------------------------- > Michel Bourget - SGI - Linux Software Engineering > "Past BIOS POST, everything else is extra" (travis) > ----------------------------------------------------------- >
