specify the number of GPU

10 views
Skip to first unread message

Conrard Giresse TETSASSI FEUGMO

unread,
Jul 13, 2022, 6:22:02 PM7/13/22
to aiidausers
HI 

I  using AiiDA 2.0.1 and am trying to run  a calculation using GPU 

Please I will like to know the keyword to specify the number of GPU 

# SBATCH --gres=gpu:1

Best,

Conrard Tetsassi 

Giovanni Pizzi

unread,
Jul 14, 2022, 12:02:16 AM7/14/22
to AiiDA users mailing list
Dear Conrard,

you need to use the `custom_scheduler_commands` option of the CalcJob, see here:

The docs say:
Set a (possibly multiline) string with the commands that the user wants to manually set for the scheduler. The difference of this option with respect to the prepend_text is the position in the scheduler submission file where such text is inserted: with this option, the string is inserted before any non-scheduler command

E.g. you can use something like this before submission (if you use a builder; otherwise equivalently add the option to the 'options' dictionary if you are passing the inputs as a dictionary, in parallel with the job resources): 

builder.metadata.options.custom_scheduler_commands = "# SBATCH --gres=gpu:1"

Best,
Giovanni Pizzi




--
AiiDA is supported by the NCCR MARVEL (http://nccr-marvel.ch/), funded by the Swiss National Science Foundation, and by the European H2020 MaX Centre of Excellence (http://www.max-centre.eu/).
 
Before posting your first question, please see the posting guidelines at http://www.aiida.net/?page_id=356 .
---
You received this message because you are subscribed to the Google Groups "aiidausers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to aiidausers+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/aiidausers/4045b18b-2587-4468-88a7-3ac75bf47f0dn%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages