diff --git a/runmanager/__main__.py b/runmanager/__main__.py
index 0c38710..78158f4 100644
--- a/runmanager/__main__.py
+++ b/runmanager/__main__.py
@@ -1793,6 +1793,8 @@ def on_engage_clicked(self):
send_to_BLACS = self.ui.checkBox_run_shots.isChecked()
send_to_runviewer = self.ui.checkBox_view_shots.isChecked()
labscript_file = self.ui.lineEdit_labscript_file.text()
+ lyse_host = self.ui.lineEdit_Lyse_hostname.text()
+
# even though we shuffle on a per global basis, if ALL of the globals are set to shuffle, then we may as well shuffle again. This helps shuffle shots more randomly than just shuffling within each level (because without this, you would still do all shots with the outer most variable the same, etc)
shuffle = self.ui.pushButton_shuffle.checkState() == QtCore.Qt.Checked
if not labscript_file:
@@ -1819,7 +1821,7 @@ def on_engage_clicked(self):
labscript_file, run_files = self.make_h5_files(
labscript_file, output_folder, sequenceglobals, shots, shuffle)
self.ui.pushButton_abort.setEnabled(True)
- self.compile_queue.put([labscript_file, run_files, send_to_BLACS, BLACS_host, send_to_runviewer])
+ self.compile_queue.put([labscript_file, run_files, send_to_BLACS, BLACS_host, send_to_runviewer, lyse_host])
except Exception as e:
self.output_box.output('%s\n\n' % str(e), red=True)
logger.info('end engage')
@@ -3044,9 +3046,12 @@ def get_save_data(self):
if is_using_default_shot_output_folder:
shot_output_folder = ''
- # Get the server hostnames:
+ # Get the BLACS server hostnames:
blacs_host = self.ui.lineEdit_BLACS_hostname.text()
+ # Get the lyse server hostnames:
+ lyse_host = self.ui.lineEdit_Lyse_hostname.text()
+
send_to_runviewer = self.ui.checkBox_view_shots.isChecked()
send_to_blacs = self.ui.checkBox_run_shots.isChecked()
shuffle = self.ui.pushButton_shuffle.isChecked()
@@ -3070,7 +3075,8 @@ def get_save_data(self):
'send_to_blacs': send_to_blacs,
'shuffle': shuffle,
'axes': axes,
- 'blacs_host': blacs_host}
+ 'blacs_host': blacs_host,
+ 'lyse_host': lyse_host}
return save_data
def save_configuration(self, save_file):
@@ -3205,6 +3211,10 @@ def warning(message):
if blacs_host is not None:
self.ui.lineEdit_BLACS_hostname.setText(blacs_host)
+ lyse_host = runmanager_config.get('lyse_host')
+ if blacs_host is not None:
+ self.ui.lineEdit_Lyse_hostname.setText(lyse_host)
+
# Set as self.last_save_data:
save_data = self.get_save_data()
self.last_save_data = save_data
@@ -3214,7 +3224,7 @@ def warning(message):
def compile_loop(self):
while True:
try:
- labscript_file, run_files, send_to_BLACS, BLACS_host, send_to_runviewer = self.compile_queue.get()
+ labscript_file, run_files, send_to_BLACS, BLACS_host, send_to_runviewer, lyse_host = self.compile_queue.get()
run_files = iter(run_files) # Should already be in iterator but just in case
while True:
if self.compilation_aborted.is_set():
@@ -3230,14 +3240,14 @@ def compile_loop(self):
self.output_box.output('Ready.\n\n')
break
else:
- self.to_child.put(['compile', [labscript_file, run_file]])
+ self.to_child.put(['compile', [labscript_file, run_file, lyse_host]])
signal, success = self.from_child.get()
assert signal == 'done'
if not success:
self.compilation_aborted.set()
continue
if send_to_BLACS:
- self.send_to_BLACS(run_file, BLACS_host)
+ self.send_to_BLACS(run_file, BLACS_host, lyse_host)
if send_to_runviewer:
self.send_to_runviewer(run_file)
except Exception as e:
@@ -3462,12 +3472,14 @@ def make_h5_files(self, labscript_file, output_folder, sequence_globals, shots,
logger.debug(run_files)
return labscript_file, run_files
- def send_to_BLACS(self, run_file, BLACS_hostname):
+ def send_to_BLACS(self, run_file, BLACS_hostname, lyse_host):
port = int(self.exp_config.get('ports', 'BLACS'))
agnostic_path = shared_drive.path_to_agnostic(run_file)
self.output_box.output('Submitting run file %s.\n' % os.path.basename(run_file))
try:
- response = zmq_get(port, BLACS_hostname, data=agnostic_path)
+ message = {"agnostic_path": agnostic_path,
+ "lyse_host": lyse_host}
+ response = zmq_get(port, BLACS_hostname, data=message)
if 'added successfully' in response:
self.output_box.output(response)
else:
diff --git a/runmanager/batch_compiler.py b/runmanager/batch_compiler.py
index 6c6f438..d7fb2f7 100644
--- a/runmanager/batch_compiler.py
+++ b/runmanager/batch_compiler.py
@@ -53,7 +53,7 @@ def mainloop(self):
else:
raise ValueError(signal)
- def compile(self, labscript_file, run_file):
+ def compile(self, labscript_file, run_file, lyse_host):
self.script_module.__file__ = labscript_file
# Save the current working directory before changing it to the location of the
@@ -64,7 +64,8 @@ def compile(self, labscript_file, run_file):
try:
# Do not let the modulewatcher unload any modules whilst we're working:
with kill_lock, module_watcher.lock:
- labscript.labscript_init(run_file, labscript_file=labscript_file)
+ labscript.labscript_init(run_file,
+ labscript_file=labscript_file)
with open(labscript_file) as f:
code = compile(
f.read(), self.script_module.__file__, 'exec', dont_inherit=True
diff --git a/runmanager/main.ui b/runmanager/main.ui
index 3f6f374..36ab18d 100644
--- a/runmanager/main.ui
+++ b/runmanager/main.ui
@@ -94,7 +94,16 @@ QToolButton:hover:checked {
0
-
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
0
-
@@ -307,7 +316,100 @@ subprocess
6
-
-
+
-
+
+
+ false
+
+
+ QToolButton{
+ background: rgb(224,224,224);
+ padding: 3px;
+}
+
+
+ QFrame::StyledPanel
+
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
-
+
+
+
+ 0
+ 0
+
+
+
+ The labscript file to compile.
+
+
+
+
+
+ false
+
+
+ true
+
+
+
+ -
+
+
+ Qt::Vertical
+
+
+
+ -
+
+
+ Select a file ...
+
+
+ QToolButton{
+ border: none;
+ background: white;
+ padding: 2px;
+}
+
+QToolButton:hover {
+ background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
+ stop: 0 #f6f7fa, stop: 1 #dadbde);
+ }
+
+ QToolButton:pressed {
+ background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
+ stop: 0 #dadbde, stop: 1 #f6f7fa);
+ }
+
+
+ ...
+
+
+
+ :/qtutils/fugue/folder-open-document-text.png:/qtutils/fugue/folder-open-document-text.png
+
+
+
+
+
+
+ -
<html><head/><body><p>The host computer running BLACS.</p></body></html>
@@ -327,7 +429,7 @@ subprocess
- -
+
-
false
@@ -358,7 +460,7 @@ subprocess
- -
+
-
false
@@ -375,7 +477,14 @@ subprocess
- -
+
-
+
+
+ Lyse hostname
+
+
+
+ -
@@ -396,7 +505,16 @@ subprocess
0
-
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
0
-
@@ -478,88 +596,17 @@ QToolButton:hover {
- -
-
-
- false
+
-
+
+
+ <html><head/><body><p>The host computer running BLACS.</p></body></html>
-
- QToolButton{
- background: rgb(224,224,224);
- padding: 3px;
-}
+
+ localhost
-
- QFrame::StyledPanel
+
+ true
-
-
- 0
-
-
- 0
-
-
-
-
-
-
- 0
- 0
-
-
-
- The labscript file to compile.
-
-
-
-
-
- false
-
-
- true
-
-
-
- -
-
-
- Qt::Vertical
-
-
-
- -
-
-
- Select a file ...
-
-
- QToolButton{
- border: none;
- background: white;
- padding: 2px;
-}
-
-QToolButton:hover {
- background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
- stop: 0 #f6f7fa, stop: 1 #dadbde);
- }
-
- QToolButton:pressed {
- background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
- stop: 0 #dadbde, stop: 1 #f6f7fa);
- }
-
-
- ...
-
-
-
- :/qtutils/fugue/folder-open-document-text.png:/qtutils/fugue/folder-open-document-text.png
-
-
-
-
@@ -620,7 +667,16 @@ QToolButton:hover {
0
-
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
0
-
@@ -643,7 +699,16 @@ QToolButton:hover {
0
-
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
0
-
@@ -754,15 +819,24 @@ QToolButton:hover {
0
0
- 926
- 486
+ 71
+ 71
0
-
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
0
-
@@ -770,15 +844,15 @@ QToolButton:hover {
QAbstractItemView::NoEditTriggers
+
+ true
+
QAbstractItemView::ExtendedSelection
QAbstractItemView::SelectRows
-
- true
-
@@ -802,7 +876,16 @@ QToolButton:hover {
0
-
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
0
-
@@ -810,7 +893,16 @@ QToolButton:hover {
9
-
+
+ 3
+
+
+ 3
+
+
+ 3
+
+
3
-
@@ -892,15 +984,24 @@ QToolButton:hover {
0
0
- 963
- 448
+ 83
+ 71
0
-
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
0
-
@@ -926,7 +1027,7 @@ QToolButton:hover {
0
0
1000
- 31
+ 21