https://github.com/utahplt/floattrackerexamples
Examples for the FloatTracker.jl repository
https://github.com/utahplt/floattrackerexamples
floating-point julia
Last synced: 5 months ago
JSON representation
Examples for the FloatTracker.jl repository
- Host: GitHub
- URL: https://github.com/utahplt/floattrackerexamples
- Owner: utahplt
- License: mit
- Created: 2023-03-17T21:26:53.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-12-07T01:27:28.000Z (over 1 year ago)
- Last Synced: 2025-12-25T21:02:39.632Z (6 months ago)
- Topics: floating-point, julia
- Language: Shell
- Homepage:
- Size: 153 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# FloatTrackerExamples
Examples for the [TrackedFloats.jl](https://github.com/utahplt/TrackedFloats.jl) repository (formerly `FloatTracker.jl`).
# Synopsis
To install the dependencies, open up a Julia REPL and enter the package manager by typing `]`, then run the following:
```
pkg> activate .
pkg> instantiate
```
Once the dependencies are loaded, you can run the examples with e.g.:
```
$ julia --project=. examples/nbody.jl
```
If the FloatTracker.jl source has updated, run the following from the package manager:
```
pkg> activate .
pkg> up
```
You can also add the FloatTracker.jl source as a dev dependency:
```
pkg> develop FloatTracker.jl
```
And when you want to switch back to the "normal" version:
```
pkg> free FloatTracker.jl
```
See instructions on the [Julia package manager docs](https://pkgdocs.julialang.org/v1/getting-started/#Modifying-A-Dependency).
# Description
[FloatTracker.jl](https://github.com/utahplt/FloatTracker.jl) is a [Julia](https://julialang.org) library for diagnosing floating-point errors. This repository showcases how it can be used.
## Examples
We've created several examples of our library in action, most utilizing existing Julia packages.
### NBodySimulator.jl
[NBodySimulator](https://github.com/SciML/NBodySimulator.jl) simulates n-interacting bodies.
```
$ julia --project=. examples/nbody.jl
```
### Finch.jl
[Finch](https://github.com/paralab/finch) is a DSL for solving partial differential equations numerically.
Install Finch from its github repo and **NOT** by name (`Pkg.add("Finch")`), because that way
leads to [`willow-ahrens/Finch.jl`](https://github.com/willow-ahrens/Finch.jl):
```
$ julia --project=. -e 'import Pkg; Pkg.add("https://github.com/paralab/Finch.git")'
```
To run an example:
```
$ julia --project=. examples/finch/example-advection2d-fv.jl
```
### ShallowWaters.jl
[ShallowWaters.jl](https://github.com/milankl/shallowwaters.jl) is a Julia library for simulating a shallow water model. The interesting thing with this project is that the type of float used in the simulation has been parameterized, allowing us to easily inject our `TrackedFloat` type.
```
$ julia --project=. examples/shallow_waters.jl
```
# License
MIT License
# Authors
- [Taylor Allred](https://github.com/tcallred)
- [Ashton Wiersdorf](https://github.com/ashton314)
- [Ben Greenman](https://github.com/bennn)