Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Flex Extract
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Flexpart
Flex Extract
Commits
73d2e4ed
Commit
73d2e4ed
authored
2 years ago
by
Anne Tipka
Browse files
Options
Downloads
Patches
Plain Diff
added a function to submit a batch job
parent
1e6cc1f5
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Source/Python/Mods/tools.py
+9
-0
9 additions, 0 deletions
Source/Python/Mods/tools.py
with
9 additions
and
0 deletions
Source/Python/Mods/tools.py
+
9
−
0
View file @
73d2e4ed
...
...
@@ -29,6 +29,7 @@
# July 2022 - Anne Tipka (formerly Philipp)
# - modified function put_file_to_ecserver to put the file automatically
# to $HOME directory, to avoid static path creation
# - added function to submit a batch job
#
# @License:
# (C) Copyright 2014-2020.
...
...
@@ -695,6 +696,14 @@ def put_file_to_ecserver(ecd, filename):
return
def
submit_sbatch_job
(
jobname
):
'''
'''
job_id
=
subprocess
.
check_output
([
'
sbatch
'
,
jobname
])
print
(
'
SUBMITTED SBATCH JOB
'
,
jobname
)
return
job_id
.
decode
()
def
submit_job_to_ecserver
(
target
,
jobname
):
'''
Uses ecaccess-job-submit command to submit a job to the ECMWF server.
...
...
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