From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id kHHxFvN+u2HtFQAAgWs5BA (envelope-from ) for ; Thu, 16 Dec 2021 19:01:23 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id qBmaEvN+u2GNOQAAB5/wlQ (envelope-from ) for ; Thu, 16 Dec 2021 18:01:23 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 0FD7EF8CB for ; Thu, 16 Dec 2021 19:01:23 +0100 (CET) Received: from localhost ([::1]:44824 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mxv4E-0001cU-6m for larch@yhetil.org; Thu, 16 Dec 2021 13:01:22 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54534) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mxv2z-0000P7-KW for guix-patches@gnu.org; Thu, 16 Dec 2021 13:00:05 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:53415) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mxv2z-0008En-7l for guix-patches@gnu.org; Thu, 16 Dec 2021 13:00:05 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mxv2z-0006op-4x for guix-patches@gnu.org; Thu, 16 Dec 2021 13:00:05 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#52283] [PATCH v2 10/12] gnu: Add ceres-solver-benchmarks. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 16 Dec 2021 18:00:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 52283 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 52283@debbugs.gnu.org Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 52283-submit@debbugs.gnu.org id=B52283.163967757126060 (code B ref 52283); Thu, 16 Dec 2021 18:00:05 +0000 Received: (at 52283) by debbugs.gnu.org; 16 Dec 2021 17:59:31 +0000 Received: from localhost ([127.0.0.1]:36712 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mxv2Q-0006mA-PW for submit@debbugs.gnu.org; Thu, 16 Dec 2021 12:59:31 -0500 Received: from eggs.gnu.org ([209.51.188.92]:53262) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mxv1r-0006iQ-RZ for 52283@debbugs.gnu.org; Thu, 16 Dec 2021 12:58:56 -0500 Received: from [2001:470:142:3::e] (port=44378 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mxv1m-0007ui-IC; Thu, 16 Dec 2021 12:58:50 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=PNyHqzixGiqZL1t497RfTSgAB8s4ZvZXWuIcVJSLi0s=; b=BaMTjbz9nHHcPd97D4NP Ouen7lOcPBGlqgP58xbTaw8UeY9gSghr6/fCJ6BQSlpBehyB+cvdZQWQfBMBEPRIrtPyfiNfFU+9J XS0yXEnvOy137KpCmGs/5yWj7k9TD/mELPes37696fI9cgpXgMNfq0tr0JMEtWfhb4Kh63am7FMA4 Jc1/FDeJ9t0ZpX1sUkdJfPOe40LhS756OXwqNHKSILLFgJoa1GPKuIs0qCEUETQA3j0Op7yKuPnE6 e4jZXXkQgKTRbL25ixOs8uMPQ0Q7H9CoVDzrNZ+3M4zO+L/IeM52COH9KA05qbacsEz6dGg4/yV6Q hps6y2UrOBH9ng==; Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=42202 helo=gnu.org) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mxv1l-0000YX-7F; Thu, 16 Dec 2021 12:58:50 -0500 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Date: Thu, 16 Dec 2021 18:58:25 +0100 Message-Id: <20211216175827.2077-11-ludo@gnu.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211216175827.2077-1-ludo@gnu.org> References: <87lf0wkcam.fsf@gnu.org> <20211216175827.2077-1-ludo@gnu.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1639677683; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=PNyHqzixGiqZL1t497RfTSgAB8s4ZvZXWuIcVJSLi0s=; b=Q0YOIfIKrInGRDvBKDImk8wIGliCng9wcghOtr5r+xh+W2l7VcE5uSB9y7g6VNlbP6zcA1 w2pPMxRPmB6s+2fAffXqdi4u6Tazxh5t+Xgk1izn1EMQntQ1zxjekSEEKE6kqP34kQxmCq awBzcoVTLZoVTY7IEVcT+z9OWBkV4HbvdmgR2q+wA0F71tV38BAja2kqAnNvfpDS+V0WrH nI2lOOs+5kxW5PwRAGcvb4n7pSPJ1JbVSDd/cUlOf3/JymUVHyWtgsRnPhMwnTD3qeiE+c 0CWRbpdZLwFRxZQQ7c+4wo+c8EArUxowT6G4Dhf/SBIfvJUwFFhKqfXNzeM7vg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1639677683; a=rsa-sha256; cv=none; b=XSTT9b2feQ1xd+l46gC7RrxZL076BMYVcGv4LKS5+d1e+YNAXhvBM5k+ZkniTYdTFPjiUs Nu37lsro+FmX+DHMHKGo5odUZIKScTSm4tINxR4TElfw4j0CJQSTvHRuKZNuzZLm3lj7if 50VMocIbAjy47o9DVMRBjO8qNN+K6MIhKIWjJY8b45dW4yEvayxJy8zhAYx7nvWLxcBYnJ 0pFbDR4kKiafEN+qNrSFB5RF0EJVpIyfl9D6hULnZS9K2oUN7tE1SjCR+rOR3paJ5hiCQ6 88ReO4ZweLi58ynBUMkTlemVSdMMtbl4SLIt39kpfMusu7od486V1ClqIa2Gww== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=BaMTjbz9; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -2.69 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=BaMTjbz9; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 0FD7EF8CB X-Spam-Score: -2.69 X-Migadu-Scanner: scn0.migadu.com X-TUID: y3KGAcKp6kza * gnu/packages/maths.scm (ceres-solver-benchmarks): New variable. --- gnu/packages/maths.scm | 43 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm index 256b1c4421..7f2994d10b 100644 --- a/gnu/packages/maths.scm +++ b/gnu/packages/maths.scm @@ -2416,6 +2416,49 @@ (define-public ceres ;; Mark as tunable to take advantage of SIMD code in Eigen. (properties `((tunable? . #t))))) +(define-public ceres-solver-benchmarks + (package + (inherit ceres) + (name "ceres-solver-benchmarks") + (arguments + '(#:modules ((ice-9 popen) + (ice-9 rdelim) + (guix build utils) + (guix build cmake-build-system)) + + #:phases (modify-phases %standard-phases + (delete 'configure) + (replace 'build + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (bin (string-append out "/bin"))) + (define flags + (string-tokenize + (read-line (open-pipe* OPEN_READ + "pkg-config" "eigen3" + "--cflags")))) + + (define (compile-file file) + (let ((source (string-append file ".cc"))) + (format #t "building '~a'...~%" file) + (apply invoke "c++" "-fopenmp" "-O2" "-g" "-DNDEBUG" + source "-lceres" "-lbenchmark" "-lglog" + "-pthread" + "-o" (string-append bin "/" file) + "-I" ".." flags))) + + (mkdir-p bin) + (with-directory-excursion "internal/ceres" + (for-each compile-file + '("small_blas_gemm_benchmark" + "small_blas_gemv_benchmark" + "autodiff_cost_function_benchmark")))))) + (delete 'check) + (delete 'install)))) + (inputs (modify-inputs (package-inputs ceres) + (prepend googlebenchmark ceres))) + (synopsis "Benchmarks of the Ceres optimization problem solver"))) + ;; For a fully featured Octave, users are strongly recommended also to install ;; the following packages: less, ghostscript, gnuplot. (define-public octave-cli -- 2.33.0