Skip to content

Examples for the FloatTracker.jl repository

License

Notifications You must be signed in to change notification settings

utahplt/FloatTrackerExamples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

6351436 · Dec 7, 2024

History

65 Commits
May 9, 2023
Jul 21, 2023
May 31, 2023
Jul 21, 2023
Mar 17, 2023
May 31, 2023
Jul 3, 2023
Dec 7, 2024
Jun 5, 2023
Jul 21, 2023
Jul 8, 2023
Jun 1, 2023

Repository files navigation

FloatTrackerExamples

Examples for the 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.

Description

FloatTracker.jl is a Julia 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 simulates n-interacting bodies.

$ julia --project=. examples/nbody.jl

Finch.jl

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:

$ 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 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