Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
ACME-Workflow
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pegasus-isi
ACME-Workflow
Commits
84106ab3
Commit
84106ab3
authored
10 years ago
by
Juve, Gideon
Browse files
Options
Downloads
Patches
Plain Diff
Update scripts for new directory structure
parent
85be8191
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
bin/acme-amwg.sh
+38
-6
38 additions, 6 deletions
bin/acme-amwg.sh
bin/acme-output.sh
+19
-10
19 additions, 10 deletions
bin/acme-output.sh
bin/acme-run.sh
+22
-6
22 additions, 6 deletions
bin/acme-run.sh
with
79 additions
and
22 deletions
bin/acme-amwg.sh
+
38
−
6
View file @
84106ab3
...
...
@@ -2,8 +2,42 @@
set
-e
if
[
$#
-ne
1
]
;
then
echo
"Usage:
$0
diag140804.csh"
function
usage
()
{
echo
"Usage:
$0
-case CASENAME -script diag140804.csh"
}
if
[
$#
-eq
0
]
;
then
usage
exit
1
fi
while
[
"$#"
-ne
0
]
;
do
case
"
$1
"
in
-case
)
shift
CASENAME
=
$1
;;
-script
)
shift
SCRIPT
=
$1
;;
*
)
usage
exit
1
;;
esac
shift
done
if
[
-z
"
$CASENAME
"
]
;
then
usage
echo
"ERROR: Specify CASENAME"
exit
1
fi
if
[
-z
"
$SCRIPT
"
]
;
then
usage
echo
"ERROR: Specify SCRIPT"
exit
1
fi
...
...
@@ -20,9 +54,7 @@ fi
module load ncl
module load nco
# Chmod the templated script for this stage
chmod
755
$1
/bin/csh
$PWD
/
$SCRIPT
||
true
# Run the script on the service node
./
$1
||
true
exit
0
This diff is collapsed.
Click to expand it.
bin/acme-output.sh
+
19
−
10
View file @
84106ab3
...
...
@@ -3,7 +3,7 @@
set
-e
function
usage
()
{
echo
"Usage:
$0
-stage N"
echo
"Usage:
$0
-case CASENAME
-stage N"
}
if
[
$#
-eq
0
]
;
then
...
...
@@ -13,6 +13,10 @@ fi
while
[
$#
-ne
0
]
;
do
case
"
$1
"
in
-case
)
shift
CASENAME
=
$1
;;
-stage
)
shift
STAGE
=
$1
...
...
@@ -25,36 +29,41 @@ while [ $# -ne 0 ]; do
shift
done
if
[
-z
"
$CASENAME
"
]
;
then
echo
"ERROR: Specify -casename"
usage
exit
1
fi
if
[
-z
"
$STAGE
"
]
;
then
echo
"ERROR: Specify -stage"
usage
exit
1
fi
# Get the case name
CASE
=
$(
./xmlquery CASE
-valonly
-silent
)
# Get the full path to the run directory
RUNDIR
=
$(
./xmlquery RUNDIR
-valonly
-silent
)
RUNDIR
=
$(
cd
$RUNDIR
&&
pwd
)
CASEROOT
=
$PWD
/
$CASENAME
# Get the workflow scratch directory
DIR
=
$(
pwd
)
# Make the stage output dir
STAGEDIR
=
$DIR
/
${
CASE
}
-stage
${
STAGE
}
STAGEDIR
=
$DIR
/
${
CASE
NAME
}
-stage
${
STAGE
}
mkdir
$STAGEDIR
# Get the full path to the run directory
RUNDIR
=
$(
cd
$CASEROOT
&&
./xmlquery RUNDIR
-valonly
-silent
)
RUNDIR
=
$(
cd
$RUNDIR
&&
pwd
)
# Touch this file here so that it will always exist, even if it is empty
# for the first stage
touch
outputs_to_ignore
# For each of the new files
for
f
in
$(
ls
${
RUNDIR
}
/
${
CASE
}
.
*
${
RUNDIR
}
/
*
.log.
*
.gz
${
RUNDIR
}
/rpointer.
*
|
grep
-v
-f
outputs_to_ignore
)
;
do
for
f
in
$(
ls
${
RUNDIR
}
/
${
CASE
NAME
}
.
*
${
RUNDIR
}
/
*
.log.
*
.gz
${
RUNDIR
}
/rpointer.
*
|
grep
-v
-f
outputs_to_ignore
)
;
do
# Symlink it to the output dir
ln
-s
$f
${
STAGEDIR
}
/
$(
basename
$f
)
done
# Update the ignore file to ignore outputs from the current stage
ls
${
RUNDIR
}
/
${
CASE
}
.
*
${
RUNDIR
}
/
*
.log.
*
>
outputs_to_ignore
ls
${
RUNDIR
}
/
${
CASE
NAME
}
.
*
${
RUNDIR
}
/
*
.log.
*
>
outputs_to_ignore
This diff is collapsed.
Click to expand it.
bin/acme-run.sh
+
22
−
6
View file @
84106ab3
#!/bin/bash
#!/bin/bash
-l
set
-e
function
usage
()
{
echo
"Usage:
$0
[-continue] -stage N -stop STOP_OPTION -n STOP_N"
echo
"Usage:
$0
[-continue]
-case CASENAME
-stage N -stop STOP_OPTION -n STOP_N"
}
if
[
$#
-eq
0
]
;
then
...
...
@@ -14,6 +14,10 @@ fi
CONTINUE_RUN
=
FALSE
while
[
"$#"
-ne
0
]
;
do
case
"
$1
"
in
-case
)
shift
CASENAME
=
$1
;;
-continue
)
CONTINUE_RUN
=
TRUE
;;
...
...
@@ -37,11 +41,18 @@ while [ "$#" -ne 0 ]; do
shift
done
echo
CASENAME
$CASENAME
echo
STOP_N
$STOP_N
echo
STOP_OPTION
$STOP_OPTION
echo
CONTINUE_RUN
$CONTINUE_RUN
echo
STAGE
$STAGE
if
[
-z
"
$CASENAME
"
]
;
then
echo
"ERROR: Specify -case"
usage
exit
1
fi
if
[
-z
"
$STAGE
"
]
;
then
echo
"ERROR: Specify -stage"
usage
...
...
@@ -60,6 +71,14 @@ if [ -z "$STOP_OPTION" ]; then
exit
1
fi
export
CASENAME
export
CASEROOT
=
$PWD
/
$CASENAME
cd
$CASENAME
# Make sure that the run directory is correct
./xmlchange
-file
env_run.xml
-id
RUNDIR
-val
$CASEROOT
/run
# We never want to resubmit the jobs in the Pegasus workflow
./xmlchange
-file
env_run.xml
-id
RESUBMIT
-val
0
...
...
@@ -78,12 +97,9 @@ fi
./xmlchange
-file
env_run.xml
-id
CHECK_TIMING
-val
FALSE
./xmlchange
-file
env_run.xml
-id
SAVE_TIMING
-val
FALSE
# Get the case name
CASE
=
$(
./xmlquery CASE
-valonly
-silent
)
# This script often returns non-zero, so we need to mask the failure
# We use exitcode.successmessage to detect failures
./
$CASE
.run
||
true
/bin/csh
./
$CASE
NAME
.run
||
true
exit
0
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment