Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
CTDAS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository 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
CTDAS
CTDAS
Commits
2ff8133c
Commit
2ff8133c
authored
13 years ago
by
Peters, Wouter
Browse files
Options
Downloads
Patches
Plain Diff
slight changes to job running structure on maunaloa
parent
9425e3a0
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
da/platform/maunaloa.py
+51
-2
51 additions, 2 deletions
da/platform/maunaloa.py
da/tools/initexit.py
+2
-2
2 additions, 2 deletions
da/tools/initexit.py
das.jb
+3
-2
3 additions, 2 deletions
das.jb
with
56 additions
and
6 deletions
da/platform/maunaloa.py
+
51
−
2
View file @
2ff8133c
...
...
@@ -14,14 +14,63 @@ import os
import
logging
import
subprocess
from
da.baseclasses.platform
import
PlatForm
from
da.baseclasses.platform
import
PlatForm
,
std_joboptions
class
MaunaloaPlatForm
(
PlatForm
):
def
__init__
(
self
):
self
.
Identifier
=
'
WU
R
maunaloa
'
# the identifier gives the platform name
self
.
Identifier
=
'
WU maunaloa
'
# the identifier gives the platform name
self
.
Version
=
'
1.0
'
# the platform version used
def
GetJobTemplate
(
self
,
joboptions
=
{},
block
=
False
):
"""
Returns the job template for a given computing system, and fill it with options from the dictionary provided as argument.
The job template should return the preamble of a job that can be submitted to a queue on your platform,
examples of popular queuing systems are:
- SGE
- MOAB
- XGrid
-
A list of job options can be passed through a dictionary, which are then filled in on the proper line,
an example is for instance passing the dictionary {
'
account
'
:
'
co2
'
} which will be placed
after the ``-A`` flag in a ``qsub`` environment.
An extra option ``block`` has been added that allows the job template to be configured to block the current
job until the submitted job in this template has been completed fully.
"""
template
=
"""
##
\n
"""
+
\
"""
## This is a set of dummy names, to be replaced by values from the dictionary
\n
"""
+
\
"""
## Please make your own platform specific template with your own keys and place it in a subfolder of the da package.
\n
"""
+
\
"""
##
\n
"""
+
\
"""
\n
"""
+
\
"""
#$ jobname
\n
"""
+
\
"""
#$ jobaccount
\n
"""
+
\
"""
#$ jobnodes
\n
"""
+
\
"""
#$ jobtime
\n
"""
+
\
"""
#$ jobshell
\n
"""
+
\
"""
\n
"""
+
\
"""
source /usr/local/Modules/3.2.8/init/sh
\n
"""
+
\
"""
module load python
\n
"""
+
\
"""
\n
"""
if
'
depends
'
in
joboptions
:
template
+=
"""
#$ -hold_jid depends
\n
"""
# First replace from passed dictionary
for
k
,
v
in
joboptions
.
iteritems
():
while
k
in
template
:
template
=
template
.
replace
(
k
,
v
)
# Fill remaining values with std_options
for
k
,
v
in
std_joboptions
.
iteritems
():
while
k
in
template
:
template
=
template
.
replace
(
k
,
v
)
return
template
msg1
=
'
Platform initialized: %s
'
%
self
.
Identifier
;
logging
.
info
(
msg1
)
#msg2 = '%s version: %s'%(self.Identifier,self.Version) ; logging.info(msg2)
...
...
This diff is collapsed.
Click to expand it.
da/tools/initexit.py
+
2
−
2
View file @
2ff8133c
...
...
@@ -644,8 +644,8 @@ class CycleControl(dict):
# Template and commands for job
jobparams
=
{
'
jobname
'
:
sys
.
argv
[
0
][
2
:],
'
jobtime
'
:
'
01:30:00
'
}
template
=
DaPlatForm
.
GetJobTemplate
(
jobparams
)
template
+
=
'
\n
cd %s
\n
'
%
self
[
'
dir.da_submit
'
]
template
+=
'
%s rc=%s %s >& %s
'
%
(
sys
.
argv
[
0
]
,
self
[
'
da.restart.fname
'
],
join
(
self
.
opts
,
''
),
logfile
,)
execcommand
=
os
.
path
.
join
(
self
[
'
dir.da_submit
'
]
,
sys
.
argv
[
0
])
template
+=
'
python
%s rc=%s %s >& %s
'
%
(
execcommand
,
self
[
'
da.restart.fname
'
],
join
(
self
.
opts
,
''
),
logfile
,)
# write and submit
...
...
This diff is collapsed.
Click to expand it.
das.jb
+
3
−
2
View file @
2ff8133c
...
...
@@ -3,6 +3,7 @@
#$ nserial 1
#$ 01:30:00
#$ /bin/sh
echo "All output piped to file das.out"
/opt/local/bin/python2.6 das.py rc=da.rc $1 >& das.out
module load python
python das.py rc=da.rc $1 >& das.out
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