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
02d7ebf7
Commit
02d7ebf7
authored
5 years ago
by
erwan
Browse files
Options
Downloads
Patches
Plain Diff
Chore: enhance sasa warning messages
parent
de2afd46
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/sasacore/genRegister.ml
+3
-3
3 additions, 3 deletions
lib/sasacore/genRegister.ml
lib/sasacore/sasArg.ml
+5
-4
5 additions, 4 deletions
lib/sasacore/sasArg.ml
with
8 additions
and
7 deletions
lib/sasacore/genRegister.ml
+
3
−
3
View file @
02d7ebf7
...
@@ -54,11 +54,11 @@ let (f: string list -> string * string -> unit) =
...
@@ -54,11 +54,11 @@ let (f: string list -> string * string -> unit) =
state_module
state_module
state_module
;
state_module
state_module
state_module
;
flush
oc
;
flush
oc
;
close_out
oc
;
close_out
oc
;
Printf
.
printf
"The file %s has been generated
\n
"
register_file
;
Printf
.
printf
"
[sasa]
The file %s has been generated
\n
"
register_file
;
flush
stdout
flush
stdout
);
);
if
Sys
.
file_exists
state_file
then
(
if
Sys
.
file_exists
state_file
then
(
Printf
.
printf
"Warning: %s already exist.
\n
"
state_file
Printf
.
printf
"
[sasa]
Warning: %s already exist.
\n
"
state_file
)
else
(
)
else
(
let
oc
=
open_out
state_file
in
let
oc
=
open_out
state_file
in
let
entete
=
Mypervasives
.
entete2
"(*"
"*)"
SasaVersion
.
str
SasaVersion
.
sha
in
let
entete
=
Mypervasives
.
entete2
"(*"
"*)"
SasaVersion
.
str
SasaVersion
.
sha
in
...
@@ -70,6 +70,6 @@ let copy x = x
...
@@ -70,6 +70,6 @@ let copy x = x
"
;
"
;
flush
oc
;
flush
oc
;
close_out
oc
;
close_out
oc
;
Printf
.
printf
"The file %s has been generated
\n
"
state_file
;
Printf
.
printf
"
[sasa]
The file %s has been generated
\n
"
state_file
;
flush
stdout
flush
stdout
)
)
This diff is collapsed.
Click to expand it.
lib/sasacore/sasArg.ml
+
5
−
4
View file @
02d7ebf7
(* Time-stamp: <modified the
0
4/
1
1/20
19
(at
10:47
) by Erwan Jahier> *)
(* Time-stamp: <modified the
1
4/
0
1/20
20
(at
09:36
) by Erwan Jahier> *)
type
t
=
{
type
t
=
{
...
@@ -100,7 +100,8 @@ let myexit i = exit i
...
@@ -100,7 +100,8 @@ let myexit i = exit i
let
seed_set
args
s
=
let
seed_set
args
s
=
(
match
s
with
(
match
s
with
|
Some
i
->
|
Some
i
->
Printf
.
fprintf
stderr
"The sasa random engine seed is set to %i
\n
"
i
;
if
args
.
verbose
>
0
then
Printf
.
fprintf
stderr
" [sasa] The sasa random engine seed is set to %i
\n
%!"
i
;
Random
.
init
i
;
Random
.
init
i
;
flush
stderr
;
flush
stderr
;
|
None
->
()
|
None
->
()
...
@@ -117,11 +118,11 @@ let reset_the_seed_to_last args =
...
@@ -117,11 +118,11 @@ let reset_the_seed_to_last args =
let
ic
=
open_in
f
in
let
ic
=
open_in
f
in
let
seed
=
int_of_string
(
input_line
ic
)
in
let
seed
=
int_of_string
(
input_line
ic
)
in
args
.
seed
<-
Some
seed
;
args
.
seed
<-
Some
seed
;
Printf
.
eprintf
"Replay the sasa run using the seed in %s
\n
"
f
;
Printf
.
eprintf
"
[sasa]
Replay the sasa run using the seed in %s
\n
"
f
;
flush
stderr
;
flush
stderr
;
true
true
with
_
->
with
_
->
Printf
.
eprintf
"W: cannot recover the seed in %s
\n
"
f
;
Printf
.
eprintf
"
[sasa]
W: cannot recover the seed in %s
\n
"
f
;
flush
stderr
;
flush
stderr
;
false
false
...
...
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