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
2c5785a8
Commit
2c5785a8
authored
6 years ago
by
erwan
Browse files
Options
Downloads
Patches
Plain Diff
Print the last step
parent
ac7017da
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
bin/sasa.ml
+7
-4
7 additions, 4 deletions
bin/sasa.ml
with
7 additions
and
4 deletions
bin/sasa.ml
+
7
−
4
View file @
2c5785a8
(* Time-stamp: <modified the 0
7
/03/2019 (at 16:
23
) by Erwan> *)
(* Time-stamp: <modified the 0
8
/03/2019 (at 16:
44
) by Erwan
Jahier
> *)
(* XXX Je pourrais utiliser Lwt pour rendre step non-bloquant, ce qui
(* XXX Je pourrais utiliser Lwt pour rendre step non-bloquant, ce qui
permettrait d'accelerer la simu sur les machines qui ont plusieurs
permettrait d'accelerer la simu sur les machines qui ont plusieurs
...
@@ -86,7 +86,10 @@ let rec (simu: int -> int -> Process.t list ->
...
@@ -86,7 +86,10 @@ let rec (simu: int -> int -> Process.t list ->
if
al
<>
[]
then
al
::
acc
else
acc
)
if
al
<>
[]
then
al
::
acc
else
acc
)
[]
pl_n
[]
pl_n
in
in
if
(
all
=
[]
)
then
raise
(
Silent
i
);
if
(
all
=
[]
)
then
(
Printf
.
eprintf
"step %s: %s
\n
"
(
string_of_int
(
n
-
i
+
1
))
(
StringOf
.
env
e
pl
);
raise
(
Silent
(
n
-
i
+
1
))
);
let
al
=
Demon
.
f
args
.
demon
all
in
let
al
=
Demon
.
f
args
.
demon
all
in
(* Do the steps *)
(* Do the steps *)
...
@@ -103,10 +106,10 @@ let rec (simu: int -> int -> Process.t list ->
...
@@ -103,10 +106,10 @@ let rec (simu: int -> int -> Process.t list ->
let
al_str
=
let
al_str
=
String
.
concat
","
(
List
.
map
(
fun
(
p
,_,_
a
)
->
Printf
.
sprintf
"%s"
p
.
pid
)
al
)
String
.
concat
","
(
List
.
map
(
fun
(
p
,_,_
a
)
->
Printf
.
sprintf
"%s"
p
.
pid
)
al
)
in
in
Printf
.
eprintf
"step %s: %s (%s)
\n
"
(
string_of_int
(
n
-
i
))
(
StringOf
.
env
e
pl
)
al_str
;
Printf
.
eprintf
"step %s: %s (%s)
\n
"
(
string_of_int
(
n
-
i
+
1
))
(
StringOf
.
env
e
pl
)
al_str
;
match
all
with
match
all
with
(* | [_] -> () *)
(* | [_] -> () *)
|
[]
->
raise
(
Silent
i
)
|
[]
->
assert
false
|
_
->
if
i
>
0
then
simu
n
(
i
-
1
)
pl
pl_n
ne
else
()
|
_
->
if
i
>
0
then
simu
n
(
i
-
1
)
pl
pl_n
ne
else
()
let
()
=
let
()
=
...
...
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