Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Simcore-rs
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
Dorian Weber
Simcore-rs
Commits
f148ed3e
Commit
f148ed3e
authored
4 years ago
by
Dorian Weber
Browse files
Options
Downloads
Patches
Plain Diff
Added a more up-to-date readme.
parent
1ad5c015
Branches
Branches containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
README.md
+24
-27
24 additions, 27 deletions
README.md
results/barbershop.lis
+0
-13
0 additions, 13 deletions
results/barbershop.lis
src/main.rs
+0
-12
0 additions, 12 deletions
src/main.rs
with
24 additions
and
52 deletions
README.md
+
24
−
27
View file @
f148ed3e
# Process-Based Simulation with Stackless Coroutines
## Overview
This repository contains the source code for the simulator core discussed in our SAM 2020 paper.
In order to run the examples, you should install the [Rust-compiler] first.
This repository contains the source code for the simulator core discussed in our IST 2021 paper.
In order to run the examples and benchmarks, you should install the [Rust-compiler], SLX and a C++ compiler first.
Any C++-14 conforming compiler should work, the ODEMx-library is translated using Rust code that searches for a compiler
first, so the popular compilers
`msvc`
,
`clang`
,
`mingw`
and
`gcc`
should all work out of the box.
The
`src/`
directory contains the source code for our simulator core
*simcore-rs*
as well as the decompressor-tokenizer-
and the barbershop-example from the paper. The folder
`benches/`
contains the code used for benchmarking the barbershop-
example. In
`slx/`
one can f
in
d
the
SLX-code for the barbershop-example, including benchmarking provisions.
The
`results/`
directory contains our benchmarking results for the barbershop-example in Rust and SLX
.
Unfortunately, there is way to get SLX at the moment, as the creator James O. Henriksen passed away in 2020, and the
company's original website has vanished. We are unsure if it would be legal for us to provide you with the demo
version
in the
context of this repository, so we opted against it. Please contact us if you wish to obtain the free
version of SLX for your own benchmarks
.
Unfortunately, we are unable to provide a link to the SLX-compiler at this time. Please contact us if you wish to
execute the barbershop-example in SLX as well.
The
`src/`
directory contains the source code for our simulator core
*simcore-rs*
as well as the decompressor-tokenizer
example from the paper. The folder
`examples/`
contains the
*Barbershop*
,
*Car Ferry*
and
*Dining Philosopher*
examples
including the code used for the comparative benchmarks. In
`slx/`
one can find the SLX-code for the same examples,
also including benchmarking provisions in the form of (real time) measurements. The
`cpp/`
folder contains three
sub-projects for the three examples that use ODEMx. The
`results/`
directory contains the complete report for our
benchmarking results. Finally, the
`odemx-lite/`
folder contains a pure version of ODEMx, that is pure in the sense
that all external dependencies have been stripped, and it only requires a C++-14 conforming compiler to be translated.
## Executing the Sample Code
You may execute the decompressor-tokenizer example using
`cargo run --bin coroutines`
and the barbershop example
using
`cargo run --bin barbershop`
. For the benchmarks of the simulator core in case of the barbershop example you may
enter
`cargo bench`
into your terminal. Cargo will download and compile all the dependencies for you.
You may execute the decompressor-tokenizer example using
`cargo run --bin coroutines`
and the other examples using
`cargo run --example <name>`
for
`<name>`
in [
*barbershop*
,
*ferry*
,
*philosophers*
]. For the benchmarks enter
`cargo bench`
into your terminal (or
`cargo bench --example <name>`
if you wish to run a specific benchmark).
Cargo will download and compile all the dependencies for you.
Should you wish to execute the SLX code as well, you will need to obtain a version of SLX first. The free student
version is sufficient to run the benchmarks
with a sample size of 1 for a quick comparison between SLX and Rust, but in
o
rder to get statistically relevant results, you need to own a license for
the full version
of SLX
.
version is sufficient to run the benchmarks
but is about 30% slower than the full version of SLX due to its generation
o
f 32-bit binaries rather than 64-bit binaries like
the full version
does
.
## Benchmarks
We executed the benchmarks under Windows 10 on an Intel Core i7-10750H processor with 6 cores and 32 GB DDR4 RAM.
You can find the results under
`results/barbershop.lis`
for SLX and
`results/barbershop/report/index.html`
for Rust.
In a nutshell: we see a speed difference between the SLX- and the Rust-version of the barbershop example of about 3 in
favor of SLX. We have summarized the results in the following table for your convenience:
We executed the benchmarks under Windows 10 on an Intel Core i7-10750H processor with 6 cores (12 with hyper-threading)
and 32 GB DDR4 RAM with activated link-time optimizations and optimization level 3.
| Model Time | SLX Mean | SLX SD | Rust Mean | Rust SD |
|:----------:|---------:|---------:|----------:|---------:|
| 100000 | 0.514 ms | 0.052 ms | 1.446 ms | 0.039 ms |
| 200000 | 1.034 ms | 0.069 ms | 2.882 ms | 0.046 ms |
| 300000 | 1.552 ms | 0.073 ms | 4.389 ms | 0.064 ms |
| 400000 | 2.069 ms | 0.089 ms | 5.754 ms | 0.051 ms |
| 500000 | 2.592 ms | 0.116 ms | 7.188 ms | 0.054 ms |
| 600000 | 3.106 ms | 0.121 ms | 8.904 ms | 0.117 ms |
| 700000 | 3.618 ms | 0.127 ms | 10.232 ms | 0.078 ms |
| 800000 | 4.136 ms | 0.150 ms | 11.587 ms | 0.230 ms |
You can find the results under
`results/criterion/report/index.html`
for all three simulation systems.
[
Rust-compiler
]:
https://rust.sh
This diff is collapsed.
Click to expand it.
results/barbershop.lis
deleted
100644 → 0
+
0
−
13
View file @
1ad5c015
barbershop.slx: SLX-64 AN206 Lines: 7,086 Errors: 0 Warnings: 0 Lines/Second: 680,384 Peak Memory: 111 MB
Execution begins
[100000] mean 0.514 ms, stddev 0.052 ms, half-width 0.001 ms
[200000] mean 1.034 ms, stddev 0.069 ms, half-width 0.002 ms
[300000] mean 1.552 ms, stddev 0.073 ms, half-width 0.002 ms
[400000] mean 2.069 ms, stddev 0.089 ms, half-width 0.002 ms
[500000] mean 2.592 ms, stddev 0.116 ms, half-width 0.003 ms
[600000] mean 3.106 ms, stddev 0.121 ms, half-width 0.003 ms
[700000] mean 3.618 ms, stddev 0.127 ms, half-width 0.003 ms
[800000] mean 4.136 ms, stddev 0.150 ms, half-width 0.004 ms
Execution complete
Objects created: 44 passive and 1,999,959,827 active Pucks created: 2,000,039,828 Peak Memory: 111 MB Time: 3.10 Minutes
This diff is collapsed.
Click to expand it.
src/main.rs
deleted
100644 → 0
+
0
−
12
View file @
1ad5c015
fn
main
()
{
let
iterations
=
11
;
let
chunk_size
=
4
;
let
res
:
Vec
<
_
>
=
(
0
..
(
iterations
-
1
)
/
chunk_size
)
.map
(|
_
|
chunk_size
)
.chain
(
std
::
iter
::
once
((
iterations
-
1
)
%
chunk_size
+
1
))
.collect
();
println!
(
"{:?}"
,
res
);
}
This diff is collapsed.
Click to expand it.
Preview
0%
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