2016-05-24 14:03:01 +02:00
|
|
|
#
|
|
|
|
# spec file for package ocaml-parmap
|
|
|
|
#
|
2024-01-16 18:22:37 +01:00
|
|
|
# Copyright (c) 2024 SUSE LLC
|
2016-05-24 14:03:01 +02:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2019-10-01 09:56:36 +02:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2016-05-24 14:03:01 +02:00
|
|
|
#
|
|
|
|
|
2017-05-31 09:38:09 +02:00
|
|
|
|
2016-05-24 14:03:01 +02:00
|
|
|
Name: ocaml-parmap
|
2023-01-02 15:57:26 +01:00
|
|
|
Version: 1.2.5
|
2016-05-24 14:03:01 +02:00
|
|
|
Release: 0
|
2017-07-25 10:41:53 +02:00
|
|
|
%{?ocaml_preserve_bytecode}
|
2019-10-01 09:56:36 +02:00
|
|
|
Summary: Multicore architecture exploitation for OCaml programs with minimal modifications
|
|
|
|
License: LGPL-2.0-only
|
2017-07-25 15:23:34 +02:00
|
|
|
Group: Development/Languages/OCaml
|
2021-01-24 23:13:58 +01:00
|
|
|
URL: https://opam.ocaml.org/packages/parmap
|
2022-04-04 17:57:05 +02:00
|
|
|
Source0: %name-%version.tar.xz
|
2016-05-24 14:03:01 +02:00
|
|
|
BuildRequires: ocaml
|
2021-05-02 23:16:38 +02:00
|
|
|
BuildRequires: ocaml-dune >= 2.7
|
2024-01-16 18:22:37 +01:00
|
|
|
BuildRequires: ocaml-rpm-macros >= 20231101
|
2016-05-30 08:45:03 +02:00
|
|
|
BuildRequires: ocamlfind(bigarray)
|
2024-01-16 18:22:37 +01:00
|
|
|
BuildRequires: ocamlfind(dune-configurator)
|
2016-06-17 08:58:45 +02:00
|
|
|
BuildRequires: ocamlfind(graphics)
|
2016-05-30 08:45:03 +02:00
|
|
|
BuildRequires: ocamlfind(unix)
|
2016-06-17 08:58:45 +02:00
|
|
|
BuildRequires: pkgconfig(x11)
|
2016-05-24 14:03:01 +02:00
|
|
|
|
|
|
|
%description
|
|
|
|
If you want to use your many cores to accelerate an operation
|
|
|
|
which happens to be a map, fold or map/fold (map-reduce), just use
|
|
|
|
Parmap's parmap, parfold and parmapfold primitives in place of the
|
|
|
|
standard List.map and friends; you can specify the number of
|
|
|
|
subprocesses to use with the optional parameter ncores, and the
|
|
|
|
size of granularity of the parallel computation with the optional
|
|
|
|
parameter chunksize.
|
|
|
|
|
|
|
|
%package devel
|
2022-04-04 17:57:05 +02:00
|
|
|
Summary: Development files for %name
|
2017-07-25 15:23:34 +02:00
|
|
|
Group: Development/Languages/OCaml
|
2022-04-04 17:57:05 +02:00
|
|
|
Requires: %name = %version
|
2016-05-24 14:03:01 +02:00
|
|
|
|
|
|
|
%description devel
|
2022-04-04 17:57:05 +02:00
|
|
|
The %name-devel package contains libraries and signature files for
|
|
|
|
developing applications that use %name.
|
2016-05-24 14:03:01 +02:00
|
|
|
|
|
|
|
|
|
|
|
%prep
|
2019-10-10 12:02:28 +02:00
|
|
|
%autosetup -p1
|
2016-05-24 14:03:01 +02:00
|
|
|
|
|
|
|
%build
|
2021-04-26 02:06:09 +02:00
|
|
|
sed -i~ '
|
|
|
|
s@10000000@1000000@
|
|
|
|
' tests/simplescale.ml
|
|
|
|
diff -u "$_"~ "$_" && exit 1
|
2019-11-01 23:49:22 +01:00
|
|
|
dune_release_pkgs='parmap'
|
|
|
|
%ocaml_dune_setup
|
|
|
|
%ocaml_dune_build
|
2016-05-24 14:03:01 +02:00
|
|
|
|
|
|
|
%install
|
2019-11-01 23:49:22 +01:00
|
|
|
%ocaml_dune_install
|
2019-10-10 12:02:28 +02:00
|
|
|
%ocaml_create_file_list
|
2016-05-26 13:58:52 +02:00
|
|
|
|
2019-11-01 23:49:22 +01:00
|
|
|
%check
|
2019-11-02 23:24:39 +01:00
|
|
|
OCAML_DUNE_RUNTEST_ARGS="-j 1"
|
2019-11-06 09:03:05 +01:00
|
|
|
export nData=$((1000 * 10))
|
|
|
|
export nProcs=2
|
2019-11-01 23:49:22 +01:00
|
|
|
%ocaml_dune_test
|
|
|
|
|
2022-04-04 17:57:05 +02:00
|
|
|
%files -f %name.files
|
2016-05-24 14:03:01 +02:00
|
|
|
|
2022-04-04 17:57:05 +02:00
|
|
|
%files devel -f %name.files.devel
|
2019-11-01 23:49:22 +01:00
|
|
|
|
|
|
|
%changelog
|