Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
frama-c
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
pub
frama-c
Commits
624fd757
Commit
624fd757
authored
6 months ago
by
Allan Blanchard
Browse files
Options
Downloads
Patches
Plain Diff
[wp] -wp-par defaults to number of logical cores
parent
67234b4f
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/plugins/wp/cores.c
+45
-0
45 additions, 0 deletions
src/plugins/wp/cores.c
src/plugins/wp/dune
+1
-0
1 addition, 0 deletions
src/plugins/wp/dune
src/plugins/wp/wp_parameters.ml
+3
-1
3 additions, 1 deletion
src/plugins/wp/wp_parameters.ml
with
49 additions
and
1 deletion
src/plugins/wp/cores.c
0 → 100644
+
45
−
0
View file @
624fd757
/**************************************************************************/
/* */
/* This file is part of Frama-C. */
/* */
/* Copyright (C) 2007-2024 */
/* CEA (Commissariat à l'énergie atomique et aux énergies */
/* alternatives) */
/* */
/* you can redistribute it and/or modify it under the terms of the GNU */
/* Lesser General Public License as published by the Free Software */
/* Foundation, version 2.1. */
/* */
/* It is distributed in the hope that it will be useful, */
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
/* GNU Lesser General Public License for more details. */
/* */
/* See the GNU Lesser General Public License version 2.1 */
/* for more details (enclosed in the file licenses/LGPLv2.1). */
/* */
/**************************************************************************/
#include
<caml/memory.h>
#include
<caml/mlvalues.h>
#ifdef _WIN32
#include
<windows.h>
#else
#include
<unistd.h>
#endif
int
cores
(
void
)
{
#ifdef WIN32
SYSTEM_INFO
sysinfo
;
GetSystemInfo
(
&
sysinfo
);
return
sysinfo
.
dwNumberOfProcessors
;
#else
return
sysconf
(
_SC_NPROCESSORS_CONF
);
#endif
}
CAMLprim
value
caml_cores
(
value
unit
)
{
CAMLparam1
(
unit
);
CAMLreturn
(
Val_int
(
cores
()));
}
This diff is collapsed.
Click to expand it.
src/plugins/wp/dune
+
1
−
0
View file @
624fd757
...
...
@@ -44,6 +44,7 @@
(select wp_eva.ml from
(frama-c-eva.core -> wp_eva.enabled.ml)
( -> wp_eva.disabled.ml)))
(foreign_stubs (language c) (names cores))
(instrumentation (backend landmarks))
(instrumentation (backend bisect_ppx)))
...
...
This diff is collapsed.
Click to expand it.
src/plugins/wp/wp_parameters.ml
+
3
−
1
View file @
624fd757
...
...
@@ -885,12 +885,14 @@ module TimeMargin =
(default: %s)."
default
end
)
external
cores
:
unit
->
int
=
"caml_cores"
let
()
=
Parameter_customize
.
set_group
wp_prover
module
Procs
=
Int
(
struct
let
option_name
=
"-wp-par"
let
arg_name
=
"p"
let
default
=
4
let
default
=
cores
()
let
help
=
Printf
.
sprintf
"Number of parallel proof process (default: %d)"
default
...
...
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