Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
sasa
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
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
verimag
synchrone
sasa
Commits
6ab7b451
Commit
6ab7b451
authored
3 years ago
by
erwan
Browse files
Options
Downloads
Patches
Plain Diff
Do not raise an error when an algorithm becomes silent.
parent
6b9a3b9c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/sasacore/daemon.ml
+32
-27
32 additions, 27 deletions
lib/sasacore/daemon.ml
with
32 additions
and
27 deletions
lib/sasacore/daemon.ml
+
32
−
27
View file @
6ab7b451
(* Time-stamp: <modified the
27
/05/2021 (at
09:06
) by Erwan Jahier> *)
(* Time-stamp: <modified the
31
/05/2021 (at
11:22
) by Erwan Jahier> *)
type
t
=
|
Synchronous
(* select all actions *)
...
...
@@ -147,29 +147,34 @@ let (f: bool -> bool -> t -> 'v Process.t list ->
bool
list
list
*
'
v
pna
list
)
=
fun
dummy_input
verbose_mode
daemon
pl
neigbors_of_pid
e
all
enab
get_action_value
->
let
nall
=
remove_empty_list
all
in
if
nall
=
[]
then
failwith
"Silent"
;
if
daemon
<>
Custom
&&
dummy_input
then
ignore
(
RifRead
.
bool
verbose_mode
((
List
.
hd
pl
)
.
pid
)
""
);
match
daemon
with
|
Synchronous
->
let
al
=
synchrone
nall
in
get_activate_val
al
pl
,
al
|
Central
->
let
al
=
central
nall
in
get_activate_val
al
pl
,
al
|
LocallyCentral
->
let
al
=
locally_central_pna
nall
in
get_activate_val
al
pl
,
al
|
Distributed
->
let
al
=
distributed
nall
in
get_activate_val
al
pl
,
al
|
Greedy
->
let
al
=
Evil
.
greedy
verbose_mode
e
pl
neigbors_of_pid
nall
in
get_activate_val
al
pl
,
al
|
GreedyCentral
->
let
al
=
Evil
.
greedy_central
verbose_mode
e
pl
neigbors_of_pid
nall
in
get_activate_val
al
pl
,
al
|
Bad
i
->
let
al
=
Evil
.
bad
i
e
nall
in
get_activate_val
al
pl
,
al
|
Custom
->
custom
all
pl
enab
get_action_value
if
nall
=
[]
then
(
Printf
.
printf
"Warning: the algorithm is now Silent
\n
%!"
;
get_activate_val
[]
pl
,
[]
)
else
(
if
daemon
<>
Custom
&&
dummy_input
then
ignore
(
RifRead
.
bool
verbose_mode
((
List
.
hd
pl
)
.
pid
)
""
);
match
daemon
with
|
Synchronous
->
let
al
=
synchrone
nall
in
get_activate_val
al
pl
,
al
|
Central
->
let
al
=
central
nall
in
get_activate_val
al
pl
,
al
|
LocallyCentral
->
let
al
=
locally_central_pna
nall
in
get_activate_val
al
pl
,
al
|
Distributed
->
let
al
=
distributed
nall
in
get_activate_val
al
pl
,
al
|
Greedy
->
let
al
=
Evil
.
greedy
verbose_mode
e
pl
neigbors_of_pid
nall
in
get_activate_val
al
pl
,
al
|
GreedyCentral
->
let
al
=
Evil
.
greedy_central
verbose_mode
e
pl
neigbors_of_pid
nall
in
get_activate_val
al
pl
,
al
|
Bad
i
->
let
al
=
Evil
.
bad
i
e
nall
in
get_activate_val
al
pl
,
al
|
Custom
->
custom
all
pl
enab
get_action_value
)
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