Skip to content
Snippets Groups Projects
Commit 96b39ba4 authored by Jörn Künsemöller's avatar Jörn Künsemöller
Browse files

Merge branch 'TMSS-2824' into 'master'

TMSS-2824: add Cobalt release setting to observation tasks and subtask JSON,...

Closes TMSS-2824

See merge request !1262
parents f9212bd4 8a2219c5
No related branches found
No related tags found
1 merge request!1262TMSS-2824: add Cobalt release setting to observation tasks and subtask JSON,...
...@@ -34,7 +34,8 @@ def station_to_host(station: str, port: int=10000) -> str: ...@@ -34,7 +34,8 @@ def station_to_host(station: str, port: int=10000) -> str:
COBALT_HEADNODE = "cbm206.control.lofar" if isProductionEnvironment() else "localhost" COBALT_HEADNODE = "cbm206.control.lofar" if isProductionEnvironment() else "localhost"
# Storage location for parsets on COBALT_HEADNODE # Storage location for parsets on COBALT_HEADNODE
COBALT_PARSET_DIR = "/opt/lofar/var/run" COBALT_PARSET_DIR_TEMPLATE = "/opt/lofar-versions/%(cobalt_release)s/var/run"
# Any overrides on the parset # Any overrides on the parset
COBALT_PARSET_OVERRIDES = """ COBALT_PARSET_OVERRIDES = """
...@@ -51,4 +52,4 @@ PIC.Core.Cobalt.cbt206_1.out_nic=[] ...@@ -51,4 +52,4 @@ PIC.Core.Cobalt.cbt206_1.out_nic=[]
COBALT_PARSET_FILENAME_PATTERN = "CorrProc_{subtask_id}.param" COBALT_PARSET_FILENAME_PATTERN = "CorrProc_{subtask_id}.param"
# Script to start observations on COBALT_HEADNODE # Script to start observations on COBALT_HEADNODE
COBALT_STARTBGL_SCRIPT = "source /home/mol/build/gnucxx11_2018_opt/installed/lofarinit.sh && LOFARENV=PRODUCTION /home/mol/build/gnucxx11_2018_opt/installed/bin/startBGL.sh" COBALT_STARTBGL_SCRIPT_TEMPLATE = "source /opt/lofar-versions/%(cobalt_release)s/lofarinit.sh && LOFARENV=PRODUCTION /opt/lofar-versions/%(cobalt_release)s/bin/runObservation.sh"
\ No newline at end of file
...@@ -28,9 +28,9 @@ from lofar.sas.tmss.services.lobster.specification_translation import extract_st ...@@ -28,9 +28,9 @@ from lofar.sas.tmss.services.lobster.specification_translation import extract_st
from .config import ( from .config import (
COBALT_HEADNODE, COBALT_HEADNODE,
COBALT_PARSET_DIR, COBALT_PARSET_DIR_TEMPLATE,
COBALT_PARSET_OVERRIDES, COBALT_PARSET_OVERRIDES,
COBALT_STARTBGL_SCRIPT, COBALT_STARTBGL_SCRIPT_TEMPLATE,
COBALT_PARSET_FILENAME_PATTERN, COBALT_PARSET_FILENAME_PATTERN,
) )
...@@ -146,6 +146,9 @@ class L2TMSSObservationControlMessageHandler(TMSSEventMessageHandler): ...@@ -146,6 +146,9 @@ class L2TMSSObservationControlMessageHandler(TMSSEventMessageHandler):
def _enqueue_observation_on_COBALT(self, subtask: dict): def _enqueue_observation_on_COBALT(self, subtask: dict):
subtask_id = subtask['id'] subtask_id = subtask['id']
cobalt_release = subtask['specifications_doc'].get('COBALT', {}).get('release', 'current')
COBALT_PARSET_DIR = COBALT_PARSET_DIR_TEMPLATE % {'cobalt_release': cobalt_release}
COBALT_STARTBGL_SCRIPT = COBALT_STARTBGL_SCRIPT_TEMPLATE % {'cobalt_release': cobalt_release}
# COBALT expects the parset to be on the disk of its head node, and # COBALT expects the parset to be on the disk of its head node, and
# then for a script to kickstart the observation process. COBALT # then for a script to kickstart the observation process. COBALT
......
...@@ -495,7 +495,7 @@ def _convert_to_parset_dict_for_observationcontrol_schema(subtask: models.Subtas ...@@ -495,7 +495,7 @@ def _convert_to_parset_dict_for_observationcontrol_schema(subtask: models.Subtas
parset[prefix+"ObservationControl.OnlineControl.CorrAppl.CorrProc._hostname"] = "cbmmaster" parset[prefix+"ObservationControl.OnlineControl.CorrAppl.CorrProc._hostname"] = "cbmmaster"
parset[prefix+"ObservationControl.OnlineControl.CorrAppl.CorrProc._nodes"] = [] parset[prefix+"ObservationControl.OnlineControl.CorrAppl.CorrProc._nodes"] = []
parset[prefix+"ObservationControl.OnlineControl.CorrAppl.CorrProc._startstopType"] = "bgl" # note: this is three correlators ago, and hopefully we get rid of it in LOFAR 2.0 ;) parset[prefix+"ObservationControl.OnlineControl.CorrAppl.CorrProc._startstopType"] = "bgl" # note: this is three correlators ago, and hopefully we get rid of it in LOFAR 2.0 ;)
parset[prefix+"ObservationControl.OnlineControl.CorrAppl.CorrProc.workingdir"] = "/opt/lofar/bin/" parset[prefix+"ObservationControl.OnlineControl.CorrAppl.CorrProc.workingdir"] = f"/opt/lofar-versions/{spec['COBALT']['release']}/bin"
parset[prefix+"ObservationControl.OnlineControl.CorrAppl._hostname"] = "cbmmaster" parset[prefix+"ObservationControl.OnlineControl.CorrAppl._hostname"] = "cbmmaster"
parset[prefix+"ObservationControl.OnlineControl.CorrAppl.extraInfo"] = '["PIC","Cobalt"]' parset[prefix+"ObservationControl.OnlineControl.CorrAppl.extraInfo"] = '["PIC","Cobalt"]'
parset[prefix+"ObservationControl.OnlineControl.CorrAppl.procesOrder"] = [] # note: typo is correct ;) parset[prefix+"ObservationControl.OnlineControl.CorrAppl.procesOrder"] = [] # note: typo is correct ;)
......
{
"description": "This schema provides a definitions for the LOFAR correlator.",
"name": "correlator",
"purpose": "technical_commissioning",
"schema": {
"$id": "https://tmss.lofar.eu/api/schemas/commonschematemplate/correlator/8#",
"$schema": "http://json-schema.org/draft-06/schema#",
"additionalProperties": false,
"definitions": {
"correlator": {
"additionalProperties": false,
"default": {},
"properties": {
"channels_per_subband": {
"default": 64,
"description": "Number of frequency bands per subband",
"enum": [
8,
16,
32,
64,
128,
256,
512,
1024
],
"minimum": 8,
"title": "Channels/subband",
"type": "integer"
},
"integration_time": {
"$ref": "https://tmss.lofar.eu/api/schemas/commonschematemplate/datetime/9#/definitions/timedelta",
"default": 1,
"description": "Desired integration period (seconds)",
"minimum": 0.1,
"title": "Integration time"
},
"storage_cluster": {
"default": "CEP4",
"description": "Cluster to write output to",
"enum": [
"CEP4",
"DragNet"
],
"title": "Storage cluster",
"type": "string"
},
"topocentric_frequency_correction": {
"default": false,
"description": "Correct frequencies for the Doppler shift caused by the Earth's rotation.",
"title": "Topocentric Frequency Correction",
"type": "boolean"
},
"release": {
"default": "current",
"description": "The version identifier for the COBALT release to use.",
"title": "Cobalt release version",
"type": "string"
}
}
}
},
"description": "This schema provides a definitions for the LOFAR correlator.",
"patternProperties": {
"^[$]schema$": {}
},
"title": "correlator",
"version": 9
},
"state": "active",
"version": 9
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment