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
66a3fb08
Commit
66a3fb08
authored
6 years ago
by
erwan
Browse files
Options
Downloads
Patches
Plain Diff
Fix: in no custom mode, enable values were not printed
parent
44fa68e2
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
lib/sasacore/sasa.ml
+9
-11
9 additions, 11 deletions
lib/sasacore/sasa.ml
with
9 additions
and
11 deletions
lib/sasacore/sasa.ml
+
9
−
11
View file @
66a3fb08
(* Time-stamp: <modified the 1
7
/03/2019 (at
11:50
) by Erwan Jahier> *)
(* Time-stamp: <modified the 1
8
/03/2019 (at
09:21
) by Erwan Jahier> *)
(* XXX Je pourrais utiliser Lwt pour rendre step non-bloquant, ce qui
permettrait d'accelerer la simu sur les machines qui ont plusieurs
...
...
@@ -76,7 +76,7 @@ let (print_step : int -> int -> SasArg.t -> Env.t -> Process.t list -> string ->
Printf
.
printf
"
\n
#step %s
\n
"
(
string_of_int
(
n
-
i
+
1
))
;
Printf
.
printf
"%s #outs "
activate_val
;
flush
stdout
);
Printf
.
printf
"%s %s
\n
"
(
StringOf
.
env_rif
e
pl
)
enable_val
;
Printf
.
printf
"%s %s
\n
"
(
StringOf
.
env_rif
e
pl
)
enable_val
;
flush
stdout
)
else
(
...
...
@@ -88,9 +88,8 @@ let (print_step : int -> int -> SasArg.t -> Env.t -> Process.t list -> string ->
exception
Silent
of
int
let
(
simustep
:
int
->
int
->
SasArg
.
t
->
Process
.
t
list
->
string
->
(
Process
.
t
*
Topology
.
neighbor
list
)
list
->
Env
.
t
->
Env
.
t
*
string
)
=
(
Process
.
t
*
Topology
.
neighbor
list
)
list
->
Env
.
t
->
Env
.
t
*
string
)
=
fun
n
i
args
pl
activate_val
pl_n
e
->
let
custom
=
args
.
demon
=
Demon
.
Custom
in
(* 1: Get enable processes *)
let
all
=
List
.
fold_left
(
fun
acc
(
p
,
nl
)
->
...
...
@@ -104,13 +103,12 @@ let (simustep: int -> int -> SasArg.t -> Process.t list -> string ->
assert
(
List
.
length
pl
=
List
.
length
all
);
let
all
=
List
.
rev
all
in
let
enab_ll
=
if
not
custom
then
[]
else
List
.
map2
(
fun
p
al
->
let
al
=
List
.
map
(
fun
(
_
,_,
a
)
->
a
)
al
in
List
.
map
(
fun
a_static
->
List
.
mem
a_static
al
)
p
.
actions
)
pl
all
List
.
map2
(
fun
p
al
->
let
al
=
List
.
map
(
fun
(
_
,_,
a
)
->
a
)
al
in
List
.
map
(
fun
a_static
->
List
.
mem
a_static
al
)
p
.
actions
)
pl
all
in
let
enable_val
=
String
.
concat
" "
(
List
.
map
(
fun
b
->
if
b
then
"t"
else
"f"
)
...
...
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