Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
pegasus-isi
ACME-Workflow
Commits
8a97c548
Commit
8a97c548
authored
Mar 15, 2015
by
Juve, Gideon
Browse files
Update DAX generator for new directory structure
parent
84106ab3
Changes
1
Hide whitespace changes
Inline
Side-by-side
daxgen.py
View file @
8a97c548
...
...
@@ -6,6 +6,7 @@ import shutil
import
string
from
ConfigParser
import
ConfigParser
from
Pegasus.DAX3
import
*
from
datetime
import
datetime
DAXGEN_DIR
=
os
.
path
.
dirname
(
os
.
path
.
realpath
(
__file__
))
TEMPLATE_DIR
=
os
.
path
.
join
(
DAXGEN_DIR
,
"templates"
)
...
...
@@ -79,6 +80,7 @@ tr acme-setup {
arch "x86_64"
os "linux"
type "STAGEABLE"
profile pegasus "exitcode.successmsg" "CESM BUILDEXE SCRIPT HAS FINISHED SUCCESSFULLY"
profile globus "count" "1"
profile globus "jobtype" "single"
profile hints "grid.jobtype" "auxillary"
...
...
@@ -142,7 +144,8 @@ tr acme-amwg {
def
generate_dax
(
self
):
"Generate a workflow (DAX, config files, and replica catalog)"
dax
=
ADAG
(
self
.
casename
)
ts
=
datetime
.
utcnow
().
strftime
(
'%Y%m%dT%H%M%SZ'
)
dax
=
ADAG
(
"acme-%s"
%
ts
)
if
self
.
stop_option
in
[
"nyear"
,
"nyears"
]:
amwg
=
True
...
...
@@ -163,7 +166,7 @@ tr acme-amwg {
i
=
1
for
stop_n
,
walltime
in
zip
(
self
.
stop_n
,
self
.
walltime
):
stage
=
Job
(
name
=
"acme-run"
)
stage
.
addArguments
(
"-
stage %s -stop %s -n %s"
%
(
i
,
self
.
stop_option
,
stop_n
))
stage
.
addArguments
(
"-
case"
,
self
.
casename
,
"-stage"
,
str
(
i
),
"-stop"
,
self
.
stop_option
,
"-n"
,
str
(
stop_n
))
stage
.
addProfile
(
Profile
(
namespace
=
"globus"
,
key
=
"maxwalltime"
,
value
=
walltime
))
dax
.
addJob
(
stage
)
if
i
==
1
:
...
...
@@ -178,7 +181,7 @@ tr acme-amwg {
output
=
File
(
"%s-stage%s/"
%
(
self
.
casename
,
i
))
archive
=
Job
(
name
=
"acme-output"
)
archive
.
addArguments
(
"-
stage %s"
%
i
)
archive
.
addArguments
(
"-
case"
,
self
.
casename
,
"-stage"
,
str
(
i
)
)
archive
.
uses
(
output
,
link
=
Link
.
OUTPUT
,
register
=
False
,
transfer
=
True
)
archive
.
addProfile
(
Profile
(
namespace
=
"globus"
,
key
=
"maxwalltime"
,
value
=
"30"
))
dax
.
addJob
(
archive
)
...
...
@@ -208,7 +211,7 @@ tr acme-amwg {
# Add the job
diag
=
Job
(
name
=
"acme-amwg"
)
diag
.
addArguments
(
script
)
diag
.
addArguments
(
"-case"
,
self
.
casename
,
"-script"
,
script
)
diag
.
uses
(
script
,
link
=
Link
.
INPUT
)
diag
.
uses
(
diagnostics
,
link
=
Link
.
OUTPUT
,
register
=
False
,
transfer
=
True
)
diag
.
addProfile
(
Profile
(
namespace
=
"globus"
,
key
=
"maxwalltime"
,
value
=
"30"
))
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment