Skip to content

Commit 3061ba6

Browse files
committed
Added the possibility to avoid the set -x option
in a cluster submission
1 parent d04621c commit 3061ba6

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

Modules/Cluster.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,12 @@ def __init__(self, hostname=None, pwd=None, extra_options="", workdir = "",
184184
self.n_together_def = 1
185185
self.use_multiple_submission = False
186186

187+
# If true, add the set -x option at the beggining of the script
188+
# This options makes the system print on stdout all executed commands.
189+
# Very usefull to debug if something goes wrong.
190+
# On some clusters may cause malfunctions.
191+
self.add_set_minus_x = True
192+
187193

188194
# This is a set of lines to be runned before the calculation
189195
# It can be used to load the needed modules in the cluster
@@ -521,7 +527,8 @@ def batch_submission(self, list_of_structures, calc, indices,
521527

522528

523529
# Add the set -x option
524-
submission += "set -x\n"
530+
if self.add_set_minus_x:
531+
submission += "set -x\n"
525532

526533
# Add the loading of the modules
527534
submission += self.load_modules + "\n"

0 commit comments

Comments
 (0)