aiidalab / aiidalab-qe

AiiDAlab App for Quantum ESPRESSO
https://aiidalab-qe.readthedocs.io/
MIT License
12 stars 14 forks source link

HPC resource settings must be expanded for PBS schedulers #368

Open PNOGillespie opened 1 year ago

PNOGillespie commented 1 year ago

Is your feature request related to a problem? Please describe. Currently, the App allows users to set only the number of nodes and CPUs for a particular workflow. For the SLURM scheduler (and maybe others, though I have not tested those), one can specify additional options via the prepend_text section of the Computer node itself instead of setting them in the builder.metadata.options namespace. For PBS schedulers (torque, PBSpro, etc) this cannot be done as the plugin for PBS in aiida-core appends cd $PBS_O_WORKDIR to the end of the scheduler options like so:

#!/bin/bash
#PBS -r n
#PBS -m n
#PBS -N aiida-696
#PBS -V
#PBS -o _scheduler-stdout.txt
#PBS -e _scheduler-stderr.txt
#PBS -l walltime=12:00:00
#PBS -l select=1:mpiprocs=16
cd "$PBS_O_WORKDIR"

#PBS -q s3par

module purge
module load IMPI/qe-7.1

The scheduler will stop parsing options in this case because it detects a shell command, so the queue name is not set for the job.

Describe the solution you'd like A simple solution, which I have already written and tested locally, is to add a simple text box to Step 3 of the setup where the user can specify the name of the queue to use. This also obviously requires a slight refactoring of the backend code in order to set these changes correctly in the builder.

Additional context Screenshot from my local version: Add_Queue_Name_to_App

unkcpz commented 1 year ago

Hi @PNOGillespie, we now have a very flexible widget to set the code. But it requires to add the template to https://github.com/aiidateam/aiida-resource-registry. Can you give it a try? Let me know if you need any help. I didn't write very detail documentation but I hope the example of two machines we set were clear for guiding to set new computer/code.