From d53c0e6ea359d61a160632cbb05d1a362e4cce4c Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Fri, 30 Jun 2023 12:22:26 +0200 Subject: [PATCH] Added Landmark profiler --- ao/README.org | 1 + common/README.org | 1 + common/lib/dune | 9 ++++----- dune-project | 3 ++- examples/dune | 10 ++++++--- gaussian/README.org | 2 ++ gaussian/lib/dune | 1 + gaussian_integrals/README.org | 1 + gaussian_integrals/lib/dune | 5 +++-- linear_algebra/README.org | 1 + mo/README.org | 1 + operators/README.org | 1 + particles/README.org | 1 + perturbation/README.org | 1 + qcaml.opam | 38 ++++++++++++++++++++++------------- qcaml/README.org | 1 + simulation/README.org | 1 + test/dune | 4 ++-- top/README.org | 1 + 19 files changed, 56 insertions(+), 27 deletions(-) diff --git a/ao/README.org b/ao/README.org index 13a5d1b..0445e43 100644 --- a/ao/README.org +++ b/ao/README.org @@ -68,6 +68,7 @@ with open(dunetest,'w') as f: qcaml.gaussian_integrals qcaml.operators ) + (instrumentation (backend landmarks)) #+end_src ** Modules without implementation diff --git a/common/README.org b/common/README.org index 523426b..609ed46 100644 --- a/common/README.org +++ b/common/README.org @@ -64,6 +64,7 @@ with open(dunetest,'w') as f: getopt unix ) + (instrumentation (backend landmarks)) #+end_src ** Modules without implementation diff --git a/common/lib/dune b/common/lib/dune index 36e3236..69f9bd5 100644 --- a/common/lib/dune +++ b/common/lib/dune @@ -13,11 +13,10 @@ unix ) - (c_names - util - ) - (c_flags (:standard) - -Ofast -mtune=native -fPIC + (foreign_stubs + (language c) + (flags (:standard) -Ofast -mtune=native -fPIC) + (names util) ) ) diff --git a/dune-project b/dune-project index d33f31a..1e164b9 100644 --- a/dune-project +++ b/dune-project @@ -1,4 +1,4 @@ -(lang dune 1.10) +(lang dune 2.7) (name qcaml) (generate_opam_files true) @@ -34,6 +34,7 @@ in quantum chemistry.") zarith alcotest domainslib + (landmarks-ppx (and :dev (>= 1.4))) ) ) diff --git a/examples/dune b/examples/dune index 7d5b55c..63a0434 100644 --- a/examples/dune +++ b/examples/dune @@ -3,9 +3,13 @@ ex_integrals ex_hartree_fock ex_localization -) -(libraries + ) + (libraries qcaml unix -)) + landmarks + ) + (instrumentation (backend landmarks-threads)) +) + diff --git a/gaussian/README.org b/gaussian/README.org index f7fea5b..1d55d64 100644 --- a/gaussian/README.org +++ b/gaussian/README.org @@ -55,6 +55,7 @@ with open(dunetest,'w') as f: #+end_src ** Dependencies + (instrumentation (backend landmarks)) #+name: dependencies #+begin_src elisp @@ -62,6 +63,7 @@ with open(dunetest,'w') as f: qcaml.common qcaml.particles ) + (instrumentation (backend landmarks)) #+end_src ** Modules without implementation diff --git a/gaussian/lib/dune b/gaussian/lib/dune index 84904d2..344f39c 100644 --- a/gaussian/lib/dune +++ b/gaussian/lib/dune @@ -9,6 +9,7 @@ qcaml.common qcaml.particles ) + (instrumentation (backend landmarks)) ) diff --git a/gaussian_integrals/README.org b/gaussian_integrals/README.org index 49fdcc8..7fa2c0f 100644 --- a/gaussian_integrals/README.org +++ b/gaussian_integrals/README.org @@ -67,6 +67,7 @@ with open(dunetest,'w') as f: qcaml.gaussian qcaml.operators ) + (instrumentation (backend landmarks)) #+end_src ** Modules without implementation diff --git a/gaussian_integrals/lib/dune b/gaussian_integrals/lib/dune index b1b65b5..80f0dbc 100644 --- a/gaussian_integrals/lib/dune +++ b/gaussian_integrals/lib/dune @@ -12,8 +12,9 @@ qcaml.operators unix domainslib - ) + landmarks + ) + (instrumentation (backend landmarks)) (modules_without_implementation matrix_on_basis) - ) diff --git a/linear_algebra/README.org b/linear_algebra/README.org index 6027477..c5cbfc8 100644 --- a/linear_algebra/README.org +++ b/linear_algebra/README.org @@ -62,6 +62,7 @@ with open(dunetest,'w') as f: qcaml.common lacaml ) + (instrumentation (backend landmarks)) #+end_src ** Modules without implementation diff --git a/mo/README.org b/mo/README.org index 00a6415..1b07246 100644 --- a/mo/README.org +++ b/mo/README.org @@ -61,6 +61,7 @@ with open(dunetest,'w') as f: (libraries qcaml.simulation ) + (instrumentation (backend landmarks)) #+end_src ** Modules without implementation diff --git a/operators/README.org b/operators/README.org index ad32ce6..f436ed3 100644 --- a/operators/README.org +++ b/operators/README.org @@ -61,6 +61,7 @@ with open(dunetest,'w') as f: (libraries qcaml.common ) + (instrumentation (backend landmarks)) #+end_src ** Modules without implementation diff --git a/particles/README.org b/particles/README.org index 15f1aa8..33ead45 100644 --- a/particles/README.org +++ b/particles/README.org @@ -63,6 +63,7 @@ with open(dunetest,'w') as f: trexio qcaml.common ) + (instrumentation (backend landmarks)) #+end_src ** Modules without implementation diff --git a/perturbation/README.org b/perturbation/README.org index 7ba9d96..178ea4b 100644 --- a/perturbation/README.org +++ b/perturbation/README.org @@ -62,6 +62,7 @@ with open(dunetest,'w') as f: qcaml.simulation qcaml.mo ) + (instrumentation (backend landmarks)) #+end_src ** Modules without implementation diff --git a/qcaml.opam b/qcaml.opam index 3d594eb..bf2951c 100644 --- a/qcaml.opam +++ b/qcaml.opam @@ -1,25 +1,18 @@ # This file is generated by dune, edit dune-project instead opam-version: "2.0" -build: [ - ["dune" "subst"] {pinned} - ["dune" "build" "-p" name "-j" jobs] - ["dune" "runtest" "-p" name "-j" jobs] {with-test} - ["dune" "build" "-p" name "@doc"] {with-doc} -] -maintainer: ["Anthony Scemama "] -authors: ["Anthony Scemama "] -bug-reports: "https://gitlab.com/scemama/qcaml/issues" -homepage: "https://gitlab.com/scemama/qcaml" -doc: "https://gitlab.com/scemama/qcaml" -license: "LGPL-2.1+ with OCaml linking exception" -dev-repo: "git+https://gitlab.com/scemama/qcaml.git" synopsis: "QCaml - Quantum chemistry with OCaml" description: """ QCaml provides a programming framewrok work wave function methods in quantum chemistry.""" +maintainer: ["Anthony Scemama "] +authors: ["Anthony Scemama "] +license: "LGPL-2.1+ with OCaml linking exception" +homepage: "https://gitlab.com/scemama/qcaml" +doc: "https://gitlab.com/scemama/qcaml" +bug-reports: "https://gitlab.com/scemama/qcaml/issues" depends: [ "ocaml" {>= "5.0"} - "dune" {>= "1.10"} + "dune" {>= "2.7" & >= "1.10"} "camlp-streams" {>= "5.0"} "trexio" "lacaml" @@ -27,4 +20,21 @@ depends: [ "zarith" "alcotest" "domainslib" + "landmarks-ppx" {dev & >= "1.4"} + "odoc" {with-doc} ] +build: [ + ["dune" "subst"] {dev} + [ + "dune" + "build" + "-p" + name + "-j" + jobs + "@install" + "@runtest" {with-test} + "@doc" {with-doc} + ] +] +dev-repo: "git+https://gitlab.com/scemama/qcaml.git" diff --git a/qcaml/README.org b/qcaml/README.org index 87e1e8e..a30e61b 100644 --- a/qcaml/README.org +++ b/qcaml/README.org @@ -42,6 +42,7 @@ with open(dune,'w') as f: (libraries {dependencies} ) + (instrumentation (backend landmarks)) <> <> ) diff --git a/simulation/README.org b/simulation/README.org index fed3419..9f41983 100644 --- a/simulation/README.org +++ b/simulation/README.org @@ -66,6 +66,7 @@ with open(dunetest,'w') as f: qcaml.operators qcaml.ao ) + (instrumentation (backend landmarks)) #+end_src ** Modules without implementation diff --git a/test/dune b/test/dune index 731f509..61d2d86 100644 --- a/test/dune +++ b/test/dune @@ -12,8 +12,8 @@ test_perturbation )) -(alias - (name runtest) +(rule + (alias runtest) (deps run_tests.exe) (action (run %{deps} -q --color=always))) diff --git a/top/README.org b/top/README.org index 850a802..9c92844 100644 --- a/top/README.org +++ b/top/README.org @@ -37,6 +37,7 @@ with open("lib/dune",'w') as f: compiler-libs.toplevel qcaml ) + (instrumentation (backend landmarks)) ) """) #+end_src