Verdi batch script submit

Is it possible to submit the verdi batch script?
I can execute the script but it is not working with sbatch command

error message

This is likely due to the X11 window server not being installed on the compute nodes.
When you submit a slurm batch script, you are no longer running on the login node.

One option is to request an interactive slurm session.

Interactive session with specific resource requests including x11

srun --x11 --mem=2gb --cpus-per-task 4 --ntasks 1 --time 1:00:00 --pty bash -l

The argument --mem limits the amount of RAM, --cpus the number of CPU cores, --time the time how long a session will be active. Note, --x11 will only work when logged in with X11 support. This requires the -X argument when logging in via ssh (see above). On OS X system X11 support is provided by XQuartz which needs to be installed and running on a system prior to loging in to a remote system. If X11 support is not available or broken then one can still connect via srun by dropping the --x11 argument form the srun command

(these instructions were obtained from Introduction to HPCC Cluster and Linux | GEN242)

Another solution is to use xvfb (X virtual frame buffer)

To install:

sudo apt-get install xvfb


sudo `yum install Xvfb`

Then add the following to your verdi script:

xvfb-run [path_to_verdi]/

  1. Should I run this command first? and then sbatch file?
    or 2. Should I this command put in sbatch file?

It has been giving me the same error.
How can I use this command?
srun --x11 --mem=2gb --cpus-per-task 4 --ntasks 1 --time 1:00:00 --pty /bin/bash -l

I cannot do the second solution because I cannot use sudo command.

If you get the same error using the interactive srun command, then this means you don’t have X11 configured.

For instance, I have Xquartz installed on my mac laptop.
From my mac, I have to start Xquartz, and then allow another host to connect to create an X11 display.
To do this, I use the following command on my mac:

xhost +

Then I login to the machine where I would like to run verdi using the ssh -Y command

ssh -Y [your-ip-address]

Once logged in, you can try to run xclock or xterm and verify that it is displayed back to your local machine.




If you don’t have a mac, then you may need to follow other instructions for getting X11 display on your local machine.

If xclock or xterm works, then you can try to run the verdi script from the command line.