Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pydtnsim
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
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
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
discus
pydtnsim
Commits
ee9885ad
Commit
ee9885ad
authored
7 years ago
by
Jarrod Pas
Browse files
Options
Downloads
Patches
Plain Diff
Adds runner for all algorithms
parent
747f1733
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!3
Version 0.2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
runners/all
+63
-0
63 additions, 0 deletions
runners/all
util/shed_summarize
+30
-0
30 additions, 0 deletions
util/shed_summarize
with
93 additions
and
0 deletions
runners/all
0 → 100755
+
63
−
0
View file @
ee9885ad
#!/usr/bin/env bash
set
-euo
pipefail
shed
=
$1
epoch
=
$((
7
*
24
*
60
*
60
))
ticks_per_packet
=
$((
60
*
120
))
time_to_live
=
$((
3
*
$epoch
))
buffer_size
=
$((
3
*
7
*
24
*
60
*
60
))
duty
=
300
run
()
{
echo
'start:'
$@
>
&2
python main.py
\
--seed
"
$3
"
\
--router
"
$1
"
\
--community
"
$2
"
\
--community-args
\
"epoch=
${
epoch
}
"
\
--trace
"csv"
\
--trace-args
\
"path=shed/data/pp_
${
shed
}
_reduced.csv"
\
--node-args
\
"tick_time=
${
duty
}
"
\
"buffer_size=
${
buffer_size
}
"
\
--packet-args
\
"ticks_per_packet=
${
ticks_per_packet
}
"
\
"time_to_live=
${
time_to_live
}
"
\
"start_delay=
${
epoch
}
"
echo
'done:'
$@
>
&2
}
nproc
=
$(
nproc
)
mkdir
-p
logs/
$shed
for
seed
in
{
1..10
}
;
do
for
router
in
direct epidemic
;
do
[[
"
$(
jobs
|
wc
-l
)
"
-ge
"
$nproc
"
]]
&&
wait
-n
run
"
$router
"
"none"
"
$seed
"
>
"logs/
${
shed
}
/
${
router
}
_
${
seed
}
.log"
&
done
for
router
in
bubble hcbf
;
do
for
community
in
kclique louvain
;
do
[[
"
$(
jobs
|
wc
-l
)
"
-ge
"
$nproc
"
]]
&&
wait
-n
run
"
$router
"
"
$community
"
"
$seed
"
>
"logs/
${
shed
}
/
${
router
}
_
${
community
}
_
${
seed
}
.log"
&
done
done
done
wait
for
f
in
direct epidemic
{
bubble,hcbf
}
_
{
kclique,louvain
}
;
do
./util/shed_summary
"logs/
$shed
/
$f
"
*
.log
>
"logs/
$shed
/
${
f
}
_summary.yml"
done
# send slack notification if the script exists
status
=
$?
notify
=
$HOME
/dev/slack-notifier/send_notification_via_slack.py
[[
-e
"
$notify
"
]]
&&
$notify
"
\`
$shed
done: exit(
$status
)
\`
"
This diff is collapsed.
Click to expand it.
util/shed_summarize
0 → 100755
+
30
−
0
View file @
ee9885ad
#!/usr/bin/env python
from
collections
import
defaultdict
import
re
import
sys
import
scipy.stats
as
stats
import
yaml
if
__name__
==
'
__main__
'
:
data
=
defaultdict
(
list
)
pattern
=
re
.
compile
(
r
'
^\w+:
'
)
for
f
in
sys
.
argv
[
1
:]:
with
open
(
f
)
as
f
:
y
=
''
for
line
in
f
:
if
pattern
.
match
(
line
):
y
+=
line
d
=
yaml
.
load
(
y
)
for
k
,
v
in
d
.
items
():
data
[
k
].
append
(
v
)
o
=
{}
for
k
,
v
in
data
.
items
():
d
=
stats
.
describe
(
v
)
o
[
k
]
=
{
'
mean
'
:
float
(
d
.
mean
),
'
stddev
'
:
float
(
d
.
variance
**
(
1
/
2
)),
}
print
(
yaml
.
dump
(
o
))
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