Skip to content

Commit

Permalink
Added Juliet
Browse files Browse the repository at this point in the history
  • Loading branch information
fcgorter committed Jul 27, 2023
1 parent e94bbb7 commit 8685c41
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ Backtrace:

## Benchmarks

### CPU SPEC

To run SPEC06 benchmarks simply run the following command:

```
Expand Down Expand Up @@ -153,6 +155,29 @@ This is an expected output:

We can see that the ASan time overhead is `205/114=79%` while FloatZone is `155/114=36%`

### Juliet

1. Edit `runtime/wrap.c` and set the `CATCH_SEGFAULT` macro to 1 to enable segmentation faults to also be caught (as ASan does).
2. Enable **FloatzoneExt** by editing `env.sh` such that `FLOATZONE_MODE="floatzone double_sided just_size"`.
3. Make sure `env.sh` is loaded via `source env.sh`
4. Check `echo $FLOATZONE_MODE` is equal to `floatzone double_sided just_size`.
5. Run `./install.sh` to update the shared library.
6. Run the following commands:

```
python3 run.py run juliet floatzone_O0 --build --cwe 121
python3 run.py run juliet floatzone_O0 --build --cwe 122
python3 run.py run juliet floatzone_O0 --build --cwe 124
python3 run.py run juliet floatzone_O0 --build --cwe 126
python3 run.py run juliet floatzone_O0 --build --cwe 127
python3 run.py run juliet floatzone_O0 --build --cwe 415
python3 run.py run juliet floatzone_O0 --build --cwe 416
```

Note 1: Some Juliet test cases are random (their test case contains the word 'rand') and you may need to re-run multiple times for it to be caught.

Note 2: Juliet needs to compile with O0, so that's why we use `floatzone_O0`


## Troubleshooting

Expand Down
2 changes: 1 addition & 1 deletion run.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def __init__(self, name, opt_level):
# force_cpu = -(NUM_OPENMP_THREADS-1) # -15 means use cores 0-15 for openMP if the binary supports it, otherwise pin to core 0
#))

# setup.add_target(Juliet(1))
setup.add_target(Juliet(1))

if __name__ == '__main__':
setup.main()

0 comments on commit 8685c41

Please sign in to comment.