You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Cylc (both 7 and 8) job.sh scripts, the mkdir commands for the share and work directories (I'm not sure where share/cycle is created) assume the directory is not a symbolic link.
# Create share and work directories
mkdir -p "${CYLC_WORKFLOW_SHARE_DIR}"||true
mkdir -p "$(dirname "${CYLC_TASK_WORK_DIR}")"||true
mkdir -p "${CYLC_TASK_WORK_DIR}"
Not so hypothetically, assume there are two lustre disks on the HPC, a production one and a failover disk. Like below.
Based on the options, neither of those two should be symbolic links, so you should just be able to have the latter one and ditch the dirname "$CYLC_TASK_WORK_DIR" I think.
The text was updated successfully, but these errors were encountered:
Thinking about this, I had a suggestion. Any suggestions in the original were based on knowledge of Cylc7 only. A way to do this nicely in Cylc8 would be (making some assumptions).
Pass through into the job script for each task, similar to a global-init-script in the global.cylc file, any resolved paths for a host. e.g. CYLC_WORKFLOW_SHARE_DIR_RESOLVED
Change mkdir to something like mkdir -p "${CYLC_WORKFLOW_SHARE_DIR:-"$CYLC_WORKFLOW_SHARE_DIR"}" || true, similarly for the work directory one
This way it doesn't have the extra i/o of readlink, and still is just one mkdir, but instead of going via symlinks, its the actual path which is known as its in the global.cylc file now instead of managed via an external tool, rose.
Thanks. I don't really like the idea of the readlink approach, although I believe it would work. If we can make use of the information contained in global.cylc instead somehow, that would be the best option I can think of without dwelling on it too extensively (or knowing all the Cylc ins and outs)..
Problem
In Cylc (both 7 and 8) job.sh scripts, the
mkdir
commands for theshare
andwork
directories (I'm not sure whereshare/cycle
is created) assume the directory is not a symbolic link.Not so hypothetically, assume there are two lustre disks on the HPC, a production one and a failover disk. Like below.
Let's say
CYLC_TASK_WORK_DIR -> /g/sc/production_disk/cylc-run/my_workflow/work
.Then, let's say a disk failover happens, so now
Cylc job.sh will fail to create these directories, and things will assume they exist.
This can lead to failures if the directories don't exist.
Proposed Solution
Be a bit more defensive and do
mkdir
on where that disk is pointing at.Similar for any directory creation for directories that could be symbolic links as defined by the
global.cylc[install][symlink dirs]
area.ps. whilst here, I don't quite get the need for two mkdir here
Based on the options, neither of those two should be symbolic links, so you should just be able to have the latter one and ditch the
dirname "$CYLC_TASK_WORK_DIR"
I think.The text was updated successfully, but these errors were encountered: