Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Slurm
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
tud-zih-energy
Slurm
Commits
fa40dbd6
Commit
fa40dbd6
authored
6 years ago
by
Morris Jette
Browse files
Options
Downloads
Plain Diff
Merge branch 'slurm-17.11'
parents
1ab63842
dc7ca7be
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
src/plugins/burst_buffer/cray/dw_wlm_cli
+76
-17
76 additions, 17 deletions
src/plugins/burst_buffer/cray/dw_wlm_cli
with
76 additions
and
17 deletions
src/plugins/burst_buffer/cray/dw_wlm_cli
+
76
−
17
View file @
fa40dbd6
#!/bin/bash
#!/bin/bash
# Emulate dw_wlm_cli (Cray's DataWarp interface) for testing purposes
# Emulate dw_wlm_cli (Cray's DataWarp interface) for testing purposes
# See "Flags=EmulateCray" in burst_buffer.conf man page
# See "Flags=EmulateCray" in burst_buffer.conf man page
#
# create_persistent
#
if
[
$2
==
"create_persistent"
]
;
then
if
[
$2
==
"create_persistent"
]
;
then
echo
'created'
echo
'created'
fi
fi
#
# data_in
#
if
[
$2
==
"data_in"
]
;
then
if
[
$2
==
"data_in"
]
;
then
sleep
100
sleep
3
# echo
'badness...'
# echo
"foo"
# exit 1
# exit 1
fi
fi
#
# data_out
#
if
[
$2
==
"data_out"
]
;
then
if
[
$2
==
"data_out"
]
;
then
sleep
1
sleep
20
# echo
'badness...'
# echo
"foo"
# exit 1
# exit 1
fi
fi
#
# destroy_persistent is defunct, use teardown
#
if
[
$2
==
"destroy_persistent"
]
;
then
if
[
$2
==
"destroy_persistent"
]
;
then
sleep
0.1
sleep
0.1
fi
fi
#
# job_process
#
if
[
$2
==
"job_process"
]
;
then
if
[
$2
==
"job_process"
]
;
then
sleep
0.1
sleep
0.1
fi
fi
#
# paths
#
if
[
$2
==
"paths"
]
;
then
if
[
$2
==
"paths"
]
;
then
if
[
$7
==
"--pathfile"
]
;
then
if
[
$7
==
"--pathfile"
]
;
then
echo
'DWPATHS=/tmp/dw'
>
$8
echo
'DWPATHS=/tmp/dw'
>
$8
fi
fi
fi
fi
#
# pre_run
#
if
[
$2
==
"pre_run"
]
;
then
if
[
$2
==
"pre_run"
]
;
then
sleep
0.1
sleep
5
# echo 'badness...'
# exit 1
fi
fi
#
# post_run
#
if
[
$2
==
"post_run"
]
;
then
if
[
$2
==
"post_run"
]
;
then
sleep
0.1
sleep
0.1
fi
fi
if
[
$2
==
"pools"
]
;
then
# echo '{ "pools": [ { "id":"dwcache", "units":"bytes", "granularity":16777216, "quantity":2048, "free":2048 } ] }'
echo
'{ "pools": [ { "id":"dwcache", "units":"bytes", "granularity":16777216, "quantity":2048, "free":2048 }, { "id":"test_pool", "units":"bytes", "granularity":16777216, "quantity":2048, "free":2048 } ] }'
#
# pools
#
if
[
$2
==
"pools"
]
;
then
echo
'{"pools": [{"free": 29, "granularity": 214748364800, "id": "wlm_pool", "quantity": 29, "units": "bytes"}]}'
fi
fi
if
[
"
$2
"
=
"
real_size
"
]
;
then
if
[
$2
=
=
"
poolsx
"
]
;
then
echo
'{ "
token":"job.1234", "capacity":17592186044416, "un
it
s
":
"bytes"
}'
echo
'{ "
pools": [ { "id":"dwcache", "units":"bytes", "granularity":16777216, "quant
it
y
":
2048, "free":2048 } ]
}'
fi
fi
#
# setup
#
if
[
$2
==
"setup"
]
;
then
if
[
$2
==
"setup"
]
;
then
sleep
6
fi
if
[
$2
==
"setupx"
]
;
then
sleep
0.1
sleep
0.1
echo
'dwpost - failed client status code %s 400
Error creating instance: 400'
exit
1
fi
fi
#
# show_configurations
#
if
[
$2
==
"show_configurations"
]
;
then
if
[
$2
==
"show_configurations"
]
;
then
echo
'{ "configurations": [ ] }'
echo
'{ "configurations": [ ] }'
fi
fi
#
# show_instances
#
if
[
$2
==
"show_instances"
]
;
then
if
[
$2
==
"show_instances"
]
;
then
echo
'{ "instances": [ ] }'
fi
if
[
$2
==
"show_instancesx"
]
;
then
echo
'{ "instances": [
echo
'{ "instances": [
{"capacity": {"bytes": 1099511627776, "nodes": 2}, "created": 1478231657, "expiration": 0, "expired": false, "id": 74, "intact": true, "label": "alpha", "limits": {"write_window_length": 86400, "write_window_multiplier": 10}, "links": {"configurations": [72], "session": 74}, "public": true, "state": {"actualized": true, "fuse_blown": false, "goal": "create", "mixed": false, "transitioning": false}},
{"capacity": {"bytes": 1288490188800, "nodes": 2}, "created": 1478232104, "expiration": 0, "expired": false, "id": 75, "intact": true, "label": "I75-0", "limits": {"write_window_length": 86400, "write_window_multiplier": 10}, "links": {"configurations": [73], "session": 75}, "public": false, "state": {"actualized": true, "fuse_blown": false, "goal": "create", "mixed": false, "transitioning": false}}
{"capacity": {"bytes": 1099511627776, "nodes": 2}, "created": 1478232104, "expiration": 0, "expired": false, "id": 75, "intact": true, "label": "I75-0", "limits": {"write_window_length": 86400, "write_window_multiplier": 10}, "links": {"configurations": [73], "session": 75}, "public": false, "state": {"actualized": true, "fuse_blown": false, "goal": "create", "mixed": false, "transitioning": false}}
] }'
] }'
fi
fi
# Create a job with ID 347 or the buffer will get torn down at slurmctld startup
#
# show_instances
#
if
[
$2
==
"show_sessions"
]
;
then
if
[
$2
==
"show_sessions"
]
;
then
echo
'{ "sessions": [ ] }'
fi
# Create a job with ID 347 or the buffer will get torn down at slurmctld startup
if
[
$2
==
"show_sessionsx"
]
;
then
echo
'{ "sessions": [
echo
'{ "sessions": [
{"created": 1478231657, "creator": "CLI", "expiration": 0, "expired": false, "id": 74, "links": {"client_nodes": []}, "owner": 1001, "state": {"actualized": true, "fuse_blown": false, "goal": "create", "mixed": false, "transitioning": false}, "token": "alpha"},
{"created": 1478232104, "creator": "SLURM", "expiration": 0, "expired": false, "id": 75, "links": {"client_nodes": ["nid00039"]}, "owner": 1001, "state": {"actualized": true, "fuse_blown": false, "goal": "create", "mixed": false, "transitioning": false}, "token": "347"}
{"created": 1478232104, "creator": "SLURM", "expiration": 0, "expired": false, "id": 75, "links": {"client_nodes": ["nid00039"]}, "owner": 1001, "state": {"actualized": true, "fuse_blown": false, "goal": "create", "mixed": false, "transitioning": false}, "token": "347"}
] }'
] }'
fi
fi
#
# teardown
#
if
[
$2
==
"teardown"
]
;
then
if
[
$2
==
"teardown"
]
;
then
sleep
0.1
sleep
0.1
# exit 1
fi
fi
exit
0
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