Skip to content

Dune, opam, and GitHub Actions fixes #105

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Jan 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- ubuntu-latest
- macos-latest
ocaml-compiler:
- ocaml-base-compiler.5.0.0~beta1
- 5.0.x
- ocaml-variants.5.1.0+trunk

runs-on: ${{ matrix.os }}
Expand All @@ -25,7 +25,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Get latest OCaml commit hash
id: multicore_hash
Expand Down
31 changes: 21 additions & 10 deletions domainslib.opam
Original file line number Diff line number Diff line change
@@ -1,23 +1,34 @@
# This file is generated by dune, edit dune-project instead
opam-version: "2.0"
maintainer: "KC Sivaramakrishnan <kc@kcsrk.info>"
synopsis: "Parallel Structures over Domains for Multicore OCaml"
maintainer: ["KC Sivaramakrishnan <kc@kcsrk.info>"]
authors: ["KC Sivaramakrishnan <kc@kcsrk.info>"]
license: "ISC"
homepage: "https://github.com/ocaml-multicore/domainslib"
doc: "https://kayceesrk.github.io/domainslib/doc"
synopsis: "Parallel Structures over Domains for Multicore OCaml"
license: "ISC"
dev-repo: "git+https://github.com/ocaml-multicore/domainslib.git"
bug-reports: "https://github.com/ocaml-multicore/domainslib/issues"
tags: []
depends: [
"ocaml" {>= "5.00"}
"dune" {>= "3.0"}
"lockfree" { >= "0.2.0"}
"mirage-clock-unix" {with-test}
"ocaml" {>= "5.0"}
"lockfree" {>= "0.2.0"}
"mirage-clock-unix" {with-test & >= "4.2.0"}
"qcheck-core" {with-test & >= "0.20"}
"qcheck-multicoretests-util" {with-test & >= "0.1"}
"qcheck-stm" {with-test & >= "0.1"}
"odoc" {with-doc}
]
depopts: []
build: [
"dune" "build" "-p" name
["dune" "subst"] {dev}
[
"dune"
"build"
"-p"
name
"-j"
jobs
"@install"
"@runtest" {with-test}
"@doc" {with-doc}
]
]
dev-repo: "git+https://github.com/ocaml-multicore/domainslib.git"
21 changes: 20 additions & 1 deletion dune-project
Original file line number Diff line number Diff line change
@@ -1,2 +1,21 @@
(lang dune 1.8)
(lang dune 3.0)
(name domainslib)
(formatting disabled)
(generate_opam_files true)

(source (github ocaml-multicore/domainslib))
(authors "KC Sivaramakrishnan <kc@kcsrk.info>")
(maintainers "KC Sivaramakrishnan <kc@kcsrk.info>")
(documentation "https://kayceesrk.github.io/domainslib/doc")
(license "ISC")

(package
(name domainslib)
(synopsis "Parallel Structures over Domains for Multicore OCaml")
(depends
(ocaml (>= "5.0"))
(lockfree (>= "0.2.0"))
(mirage-clock-unix (and :with-test (>= "4.2.0")))
(qcheck-core (and :with-test (>= "0.20")))
(qcheck-multicoretests-util (and :with-test (>= "0.1")))
(qcheck-stm (and :with-test (>= "0.1")))))
7 changes: 0 additions & 7 deletions test/LU_decomposition_multicore.ml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,6 @@ let mat_size = try int_of_string Sys.argv.(2) with _ -> 1200
let k = Domain.DLS.new_key Random.State.make_self_init

module SquareMatrix = struct

let create f : float array =
let fa = Array.create_float (mat_size * mat_size) in
for i = 0 to mat_size * mat_size - 1 do
fa.(i) <- f (i / mat_size) (i mod mat_size)
done;
fa
let parallel_create pool f : float array =
let fa = Array.create_float (mat_size * mat_size) in
T.parallel_for pool ~start:0 ~finish:( mat_size * mat_size - 1)
Expand Down
3 changes: 2 additions & 1 deletion test/backtrace.ml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ let _ =
let open Printexc in
let bt = get_raw_backtrace () in
let bt_slot_arr = Option.get (backtrace_slots bt) in
assert (Option.get (Slot.name bt_slot_arr.(1)) = "Backtrace.foo");
let name = Option.get (Slot.name bt_slot_arr.(1)) in
assert (name = "Backtrace.foo" || name = "Dune__exe__Backtrace.foo");
let s = raw_backtrace_to_string bt in
print_string s
2 changes: 2 additions & 0 deletions test/fib_par.ml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,5 @@ let main =
let res = T.run pool (fun _ -> fib_par pool n) in
T.teardown_pool pool;
Printf.printf "fib(%d) = %d\n" n res

let () = main