From ca6e242f647d0978487a3739f4f5468917f69137b54d928bbf4bcaa7824c0b71 Mon Sep 17 00:00:00 2001 From: Olaf Hering Date: Fri, 1 Nov 2019 22:49:22 +0000 Subject: [PATCH 1/9] - Require current dune macros - Update to 20191021.1b17a5d from dune branch OBS-URL: https://build.opensuse.org/package/show/devel:languages:ocaml/ocaml-parmap?expand=0&rev=34 --- _service | 4 +- ocaml-parmap-20191002.803edbb.tar.xz | 3 -- ocaml-parmap-20191021.1b17a5d.tar.xz | 3 ++ ocaml-parmap.changes | 6 +++ ocaml-parmap.spec | 81 ++++++---------------------- 5 files changed, 28 insertions(+), 69 deletions(-) delete mode 100644 ocaml-parmap-20191002.803edbb.tar.xz create mode 100644 ocaml-parmap-20191021.1b17a5d.tar.xz diff --git a/_service b/_service index 314c2d9..5059272 100644 --- a/_service +++ b/_service @@ -1,9 +1,9 @@ - git://github.com/rdicosmo/parmap.git + git://github.com/olafhering/parmap.git git %cd.%h - 803edbb03aedda79b0c681b4f14ea9a2f10b1514 + dune-wip ocaml-parmap diff --git a/ocaml-parmap-20191002.803edbb.tar.xz b/ocaml-parmap-20191002.803edbb.tar.xz deleted file mode 100644 index 6bbd2d5..0000000 --- a/ocaml-parmap-20191002.803edbb.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:67c9fbefe2cfc319e0a741f072efec60404383a40866b99a3f15cd7e4df33808 -size 63512 diff --git a/ocaml-parmap-20191021.1b17a5d.tar.xz b/ocaml-parmap-20191021.1b17a5d.tar.xz new file mode 100644 index 0000000..fca431c --- /dev/null +++ b/ocaml-parmap-20191021.1b17a5d.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0a433c605c2845a0e1d07af83e14384f59d01b3f646cabaaa8e56aa7d515d262 +size 31620 diff --git a/ocaml-parmap.changes b/ocaml-parmap.changes index 7c9192a..538aaf5 100644 --- a/ocaml-parmap.changes +++ b/ocaml-parmap.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Nov 1 12:34:56 UTC 2019 - ohering@suse.de + +- Require current dune macros +- Update to 20191021.1b17a5d from dune branch + ------------------------------------------------------------------- Wed Oct 9 05:48:16 UTC 2019 - ohering@suse.de diff --git a/ocaml-parmap.spec b/ocaml-parmap.spec index 3de2e20..bf14e99 100644 --- a/ocaml-parmap.spec +++ b/ocaml-parmap.spec @@ -17,7 +17,7 @@ Name: ocaml-parmap -Version: 20191002.803edbb +Version: 20191021.1b17a5d Release: 0 %{?ocaml_preserve_bytecode} Summary: Multicore architecture exploitation for OCaml programs with minimal modifications @@ -26,14 +26,13 @@ Group: Development/Languages/OCaml URL: http://rdicosmo.github.io/parmap/ Source: %{name}-%{version}.tar.xz BuildRequires: ocaml -BuildRequires: ocaml-oasis -BuildRequires: ocaml-ocamldoc -BuildRequires: ocaml-rpm-macros >= 20191009 +BuildRequires: ocaml-dune +BuildRequires: ocaml-rpm-macros >= 20191101 BuildRequires: ocamlfind(bigarray) +BuildRequires: ocamlfind(dune.configurator) BuildRequires: ocamlfind(graphics) BuildRequires: ocamlfind(unix) BuildRequires: pkgconfig(x11) -BuildRoot: %{_tmppath}/%{name}-%{version}-build %description If you want to use your many cores to accelerate an operation @@ -58,70 +57,24 @@ developing applications that use %{name}. %autosetup -p1 %build -echo -n > config.h -if grep -w sched_setaffinity /usr/include/sched.h -then -tee -a config.h <<_EOF_ -#define HAVE_DECL_SCHED_SETAFFINITY 1 -_EOF_ -fi -ocaml_version="$(ocamlc -version)" -case "${ocaml_version}" in - 4.03.*|4.04.*|4.05.*) - echo 'let map_file = Bigarray.Genarray.map_file' >>parmap_compat.ml - ;; - *) - echo 'let map_file = Unix.map_file' >>parmap_compat.ml - ;; -esac -rm -fv setup.ml myocamlbuild.ml META* _* */_* -# obs service changes every ^Version line ... -sh -c "sed 's/^Version.*/Version: %{version}/' | tee _oasis" <<_EOF_ -OASISFormat: 0.4 -Name: parmap -Version: 0 -Synopsis: library to exploit multicore architectures (parallel programming) -Authors: Marco Danelutto and Roberto Di Cosmo -License: WTFPL -LicenseFile: LICENSE -Plugins: META(`oasis version`) -BuildTools: ocamlbuild - -Library parmap - Path: . - Install: true - Modules: Parmap, Parmap_compat - CSources: bytearray_stubs.c, setcore_stubs.c, config.h - CCOpt: %{optflags} -I$PWD -Werror -D_GNU_SOURCE - -Document parmap - Title: API reference for parmap - Type: ocamlbuild - BuildTools+: ocamldoc - InstallDir: \$htmldir - Install: true - XOCamlbuildPath: . - XOCamlbuildLibraries: parmap - -Executable "%{name}-mandels" - Install: true - Path: example - MainIs: mandels.ml - CompiledObject: best - BuildDepends: parmap, graphics, unix, bigarray -_EOF_ -%oasis_setup -%ocaml_oasis_configure --enable-docs -%ocaml_oasis_build -%ocaml_oasis_doc +dune_release_pkgs='parmap' +%ocaml_dune_setup +%ocaml_dune_build %install -%ocaml_oasis_findlib_install +%ocaml_dune_install %ocaml_create_file_list +%check +%ifarch x86_64 +%else +dune_test_tolerate_fail='dune_test_tolerate_fail bitsize' +%endif +%ocaml_dune_test + %files -f %{name}.files -%doc README.md %{_bindir}/* %files devel -f %{name}.files.devel -%{oasis_docdir_html} + +%changelog From 806a666217964d649dfdccc047b010f7252cb87a6f7a0918adc9542c4bae5559 Mon Sep 17 00:00:00 2001 From: Olaf Hering Date: Sat, 2 Nov 2019 22:24:39 +0000 Subject: [PATCH 2/9] runtest -j1 OBS-URL: https://build.opensuse.org/package/show/devel:languages:ocaml/ocaml-parmap?expand=0&rev=35 --- ocaml-parmap.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/ocaml-parmap.spec b/ocaml-parmap.spec index bf14e99..1829e58 100644 --- a/ocaml-parmap.spec +++ b/ocaml-parmap.spec @@ -66,6 +66,7 @@ dune_release_pkgs='parmap' %ocaml_create_file_list %check +OCAML_DUNE_RUNTEST_ARGS="-j 1" %ifarch x86_64 %else dune_test_tolerate_fail='dune_test_tolerate_fail bitsize' From 7b1b35c4aab504b4d2872871694af8df069686eb9d58174e6090a94f0edfaab5 Mon Sep 17 00:00:00 2001 From: Olaf Hering Date: Sun, 3 Nov 2019 10:28:49 +0000 Subject: [PATCH 3/9] runtest unconditionally OBS-URL: https://build.opensuse.org/package/show/devel:languages:ocaml/ocaml-parmap?expand=0&rev=36 --- ocaml-parmap.spec | 4 ---- 1 file changed, 4 deletions(-) diff --git a/ocaml-parmap.spec b/ocaml-parmap.spec index 1829e58..2268de6 100644 --- a/ocaml-parmap.spec +++ b/ocaml-parmap.spec @@ -67,10 +67,6 @@ dune_release_pkgs='parmap' %check OCAML_DUNE_RUNTEST_ARGS="-j 1" -%ifarch x86_64 -%else -dune_test_tolerate_fail='dune_test_tolerate_fail bitsize' -%endif %ocaml_dune_test %files -f %{name}.files From 3a5b64bfc18d4dd0923da93ee2be147069fc45433cd30e318e0ba6fab93a5e5b Mon Sep 17 00:00:00 2001 From: Olaf Hering Date: Sun, 3 Nov 2019 10:46:56 +0000 Subject: [PATCH 4/9] add _constraints, 4G memory OBS-URL: https://build.opensuse.org/package/show/devel:languages:ocaml/ocaml-parmap?expand=0&rev=37 --- _constraints | 15 +++++++++++++++ ocaml-parmap.spec | 3 +++ 2 files changed, 18 insertions(+) create mode 100644 _constraints diff --git a/_constraints b/_constraints new file mode 100644 index 0000000..399b7cf --- /dev/null +++ b/_constraints @@ -0,0 +1,15 @@ + + + + aarch64 + ppc64le + s390x + x86_64 + + + + 4 + + + + diff --git a/ocaml-parmap.spec b/ocaml-parmap.spec index 2268de6..6b69553 100644 --- a/ocaml-parmap.spec +++ b/ocaml-parmap.spec @@ -67,6 +67,9 @@ dune_release_pkgs='parmap' %check OCAML_DUNE_RUNTEST_ARGS="-j 1" +%ifarch %ix86 +dune_test_tolerate_fail='dune_test_tolerate_fail Array.make' +%endif %ocaml_dune_test %files -f %{name}.files From e7cd9faf16a16b9f2d99a7e78ad96ba9287f474a421861e0281f1b97d2c79e48 Mon Sep 17 00:00:00 2001 From: Olaf Hering Date: Tue, 5 Nov 2019 13:38:00 +0000 Subject: [PATCH 5/9] adjust URL in _service OBS-URL: https://build.opensuse.org/package/show/devel:languages:ocaml/ocaml-parmap?expand=0&rev=38 --- _service | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/_service b/_service index 5059272..fbc2ac2 100644 --- a/_service +++ b/_service @@ -1,10 +1,10 @@ - git://github.com/olafhering/parmap.git - git - %cd.%h - dune-wip ocaml-parmap + dune-wip + git + https://github.com/olafhering/ocaml-parmap.git + %cd.%h *.tar From 4dfa32070cef5414098b6b8636181d98738c45ca69bd77d63fb8fafb37757c04 Mon Sep 17 00:00:00 2001 From: Olaf Hering Date: Tue, 5 Nov 2019 21:18:18 +0000 Subject: [PATCH 6/9] 8GB OBS-URL: https://build.opensuse.org/package/show/devel:languages:ocaml/ocaml-parmap?expand=0&rev=39 --- _constraints | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_constraints b/_constraints index 399b7cf..f03fc50 100644 --- a/_constraints +++ b/_constraints @@ -8,7 +8,7 @@ - 4 + 8 From 8fd64277eb6e618e3366d36dd06ff807a8f4060b9cb61cbd5fe199a3540d00d4 Mon Sep 17 00:00:00 2001 From: Olaf Hering Date: Wed, 6 Nov 2019 08:03:05 +0000 Subject: [PATCH 7/9] limit nProcs and nData OBS-URL: https://build.opensuse.org/package/show/devel:languages:ocaml/ocaml-parmap?expand=0&rev=40 --- ocaml-parmap.spec | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ocaml-parmap.spec b/ocaml-parmap.spec index 6b69553..93a3740 100644 --- a/ocaml-parmap.spec +++ b/ocaml-parmap.spec @@ -67,9 +67,11 @@ dune_release_pkgs='parmap' %check OCAML_DUNE_RUNTEST_ARGS="-j 1" -%ifarch %ix86 +%ifarch %ix86 %arm dune_test_tolerate_fail='dune_test_tolerate_fail Array.make' %endif +export nData=$((1000 * 10)) +export nProcs=2 %ocaml_dune_test %files -f %{name}.files From f95eaa25b6193e29fae1678f59aa4452108bed2abf932329a8ec1242ceca5921 Mon Sep 17 00:00:00 2001 From: Olaf Hering Date: Thu, 7 Nov 2019 10:06:19 +0000 Subject: [PATCH 8/9] skip runtest for bytecode-only target OBS-URL: https://build.opensuse.org/package/show/devel:languages:ocaml/ocaml-parmap?expand=0&rev=41 --- ocaml-parmap.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/ocaml-parmap.spec b/ocaml-parmap.spec index 93a3740..9cc05fe 100644 --- a/ocaml-parmap.spec +++ b/ocaml-parmap.spec @@ -66,6 +66,7 @@ dune_release_pkgs='parmap' %ocaml_create_file_list %check +test -x "$(type -P ocamlc.opt)" || exit 0 OCAML_DUNE_RUNTEST_ARGS="-j 1" %ifarch %ix86 %arm dune_test_tolerate_fail='dune_test_tolerate_fail Array.make' From 924686dd4e2c801f2520391826667e39b0bd0d4c3ce883e59f678570bd0b7644 Mon Sep 17 00:00:00 2001 From: Olaf Hering Date: Wed, 13 Nov 2019 08:32:23 +0000 Subject: [PATCH 9/9] catch all 32bit variants OBS-URL: https://build.opensuse.org/package/show/devel:languages:ocaml/ocaml-parmap?expand=0&rev=42 --- ocaml-parmap.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ocaml-parmap.spec b/ocaml-parmap.spec index 9cc05fe..11ec70c 100644 --- a/ocaml-parmap.spec +++ b/ocaml-parmap.spec @@ -68,7 +68,7 @@ dune_release_pkgs='parmap' %check test -x "$(type -P ocamlc.opt)" || exit 0 OCAML_DUNE_RUNTEST_ARGS="-j 1" -%ifarch %ix86 %arm +%if "%{_lib}" == "lib" dune_test_tolerate_fail='dune_test_tolerate_fail Array.make' %endif export nData=$((1000 * 10))