Opened 4 months ago

Closed 4 months ago

#3407 closed help (fixed)

Cylc broadcast: settings from file

Reported by: luciana Owned by: um_support
Component: Rose/Cylc Keywords: broadcast
Cc: Platform: JASMIN
UM Version:

Description

Good morning.

I'm trying to learn how to use Cylc broadcast.

I've found some tests in GitHub? (cylc-flow/tests/broadcast/), but they don't go deep into the syntax to apply the settings from a file (broadcast.rc). In the examples I found, only [environment] is changed. How do I change a task in a specific cycle-point using an external .rc file?

Kind regards.

Luciana.

Change History (3)

comment:1 Changed 4 months ago by ros

Hi Luciana,

If I understand you correctly I think you need the -F <FILE> option to cylc broadcast.

You can see all the options for cylc broadcast by running cylc broadcast --help

Regards,
Ros.

comment:2 Changed 4 months ago by luciana

Dear Rosalyn.

Thank you for your quick response. My question is about the syntax in the broadcast.rc file. For example, in the help we have:

To broadcast a variable to all tasks (quote items with internal spaces):

% cylc broadcast -s "[environment]VERSE = the quick brown fox" REG

To do the same with a file:

% cat >'broadcast.rc' <<'RC'
% [environment]
% VERSE = the quick brown fox
% RC
% cylc broadcast -F 'broadcast.rc' REG

This part converts the cylc command line to a broadcast.rc file with a modification in [environment]. I want to modify parts of the task, not only the environment. The most advanced file I could find was cylc-flow/tests/broadcast/12-file-stdin/broadcast.rc. But this file is also about changes in the environment.

The file cylc-flow/tests/broadcast/00-simple/suite.rc shows how to modify specific tasks and cycles with the command line (-p, -s, -n, etc.), but again, the modification is only in the environment of such configuration. I'm looking for something like:

Original suite.rc:

model?

script = script-model.sh;

New suite.rc:

model?

script = script-model2.sh;

I've tried all combinations of [ and ], without success. That why I asked about the syntax in the file broadcast.rc.

I hope my question is clear now. I'm assuming this is possible because I got the idea from a tread from 2012 and it looked like it was already an experimental functionality then. :)

Kind regards.

Luciana.

comment:3 Changed 4 months ago by luciana

  • Resolution set to fixed
  • Status changed from new to closed

Dear Rosalyn.

I managed to get what I needed. Not sure if it's the best way or it's a hack.

  • - -

suite.rc

model?

script = ${SCRIPT_NAME}.sh; sleep 10

[environment?]

SCRIPT_NAME = script-model

broadcast.rc

[environment]

SCRIPT_NAME = script-model2

  • - -

Kind regards.

Luciana.

Note: See TracTickets for help on using tickets.