You can add new benchmarks as follows:
-
Add dependencies to packages: If there are any package dependencies your benchmark has that are not already included in Sandmark, you can add it as a dependency to
dependencies/template/dev-*.opam. If you need to apply any patches to the dependency, add its opam file todependencies/packages/<package-name>/<package-version>/opam, and the patch to thedependencies/packages/<package-name>/<package-version>/files/directory. -
Add benchmark files: Find a relevant folder in
benchmarks/and add your code to it. Feel free to create a new folder if you don't find any existing ones relevant. Every folder inbenchmarks/has its own dune file; if you are creating a new directory for your benchmark, also create a dune file in that directory and add a stanza for your benchmark. If you are adding your benchmark to an existing directory, add a dune stanza for your benchmark in the directory's dune file.Also add you code and input files if any to an alias,
buildbenchfor sequential benchmarks andmultibench_parallelfor parallel benchmarks. For instance, if you are adding a parallel benchmarkbenchmark.mland its input fileinput.txtto a directory, in that directory's dune file add(alias (name multibench_parallel) (deps benchmark.ml input.txt)) -
Add commands to run your applications: Add an entry for your benchmark run to the appropriate config file;
run_config.jsonfor sequential benchmarks,multicore_parallel_run_config.jsonfor parallel benchmarks run onturingandmulticore_parallel_navajo_run_config.jsonfor parallel benchmarks run onnavajo.
If you want the benchmark to be run nightly, make sure it has the macro_bench
tag.
If you are contributing a parallel OCaml benchmark, ensure the following:
-
The benchmark should have a serial version with the name
foo. -
The benchmark should have a parallel version with the name
foo_multicore.IMPORTANT: Parallel version running on 1 domain is not the same as the sequential version.
-
The first argument (
paramsorshort_name) should be the number of domains. There can be other arguments that follow. When usingshort_name, the format should be<num_domains>_<other_arg>with an_separating the number of domains and other arguments.