By a simple batch job I mean running just one program under LoadLeveler, a little like in the interactive example above, without any pre or post-processing. Consequently the LoadLeveler script looks quite similar too.
Here is a simple hello world program written in Emacs Lisp:
gustav@sp20:../LoadLeveler 23:26:47 !745 $ cat hello.el (defun hello () (princ "hello world\n")) gustav@sp20:../LoadLeveler 23:27:01 !746 $
To execute this program in the Emacs batch mode under LoadLeveler I had first saved it on a file
hello.el. Then I
edited the following LoadLeveler script:
gustav@sp20:../LoadLeveler 23:27:01 !746 $ cat emacs-batch.ll # @ executable = /afs/ovpit.indiana.edu/@sys/gnu/bin/emacs # @ arguments = -batch -l hello.el -f hello # @ output = emacs-batch.out # @ error = emacs-batch.err # @ job_type = serial # @ class = test # @ notification = always # @ environment = COPY_ALL # @ queue gustav@sp20:../LoadLeveler 23:27:22 !747 $and saved it on
emacs-batch.ll.
The script was submitted to LoadLeveler with the command:
gustav@sp20:../LoadLeveler 23:27:22 !747 $ llsubmit emacs-batch.ll submit: The job "sp20.33" has been submitted. gustav@sp20:../LoadLeveler 23:28:00 !748 $
When the job had finished its execution there was a file
emacs-batch.out left in my working directory:
gustav@sp20:../LoadLeveler 23:28:00 !748 $ cat emacs-batch.out hello world gustav@sp20:../LoadLeveler 23:28:24 !749 $ $
An alternative way is to make the primary LoadLeveler job a shell script, and to execute emacs from within it. In that
case you must not use the #@executable and the #@arguments directives. Instead, use
the #@shell directive, to specify
the shell of choice for your command file. Here is an example:
# @ shell = /afs/ovpit.indiana.edu/@sys/gnu/bin/bash # @ output = emacs-batch.out # @ error = emacs-batch.err # @ job_type = serial # @ class = test # @ notification = always # @ environment = COPY_ALL # @ queue emacs -batch -l hello.el -f hello