From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id IFTPB3Vk0mQtIwAASxT56A (envelope-from ) for ; Tue, 08 Aug 2023 17:51:17 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id oGjWB3Vk0mRNsQAA9RJhRA (envelope-from ) for ; Tue, 08 Aug 2023 17:51:17 +0200 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 43DA3449FC for ; Tue, 8 Aug 2023 17:51:16 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=none; 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"; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1691509877; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: 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; bh=JX6HB/THx8ST9Tkcp3smAAyJsZYqJhTjN/rpkZYfKo0=; b=a5/tyWDs4JfjOfwCjnpNUytWfRH2x6UbwFTpwRwCsC09Ds4FDWgHvMD8te41iKBXrgMtsR nS2r/w7zx+T6m/nsId/WnRSXoKeaR6Ck5c0LSmVbfaClXg3spuNfybig/bUAwK5AOSynFq GTonvXVWaRNhEJk7/RtQpK7Ge0of8UTX5PswZxWFDHZMya7S7q4u1WU5QBNFxjnLI4iUGi Kemq1XxR8tsEPURxguhbiZkpcYawf4+riY9UmYHjK6hJqsaBDkiSE2wMbQ3zwgtVP/IyNy FHS9YrCsE9kVcYGWEu3yqockI5xsx/q8KAHkHT9mQ8lfCWT/8PlXiOJcj+RtPA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; 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"; dmarc=none ARC-Seal: i=1; s=key1; d=yhetil.org; t=1691509877; a=rsa-sha256; cv=none; b=BH506C69CCejo65xM2XeapJip9zGlaSy1dWzOTsdbXIIhcTqJ3v55MjvboSsi4uVrjL4UL 7Xq328SPUObvRuMAeDPbtNeOhSgBk2OG+9hE5eSoMcV4MzjfmI6A9PGznBXQot+BJGFIL4 Kjoiy8nha5q+T0Q3E7lcitJKF9zKzPZg+pA8bXUgzPFHM2NMvIYPrQ8QDwuvu2mlL2hBOx +liInb/Klth7stYFM72QtlZjxD0K21bmp8uI6/F/9FyoLJS3YjMKvhbLk9Dq5BOO7xh5Ip QIo4PbHjlQ7mH3AAM8IbFga4+1QkP+tP+p/Im7bJKaiVfqPM17R10LDySh3Dgw== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qTOz9-0000NV-BM; Tue, 08 Aug 2023 11:51:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qTOz8-0000NE-BA for guix-patches@gnu.org; Tue, 08 Aug 2023 11:51:02 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qTOz8-0002fk-3H for guix-patches@gnu.org; Tue, 08 Aug 2023 11:51:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qTOz7-0004Pl-O9 for guix-patches@gnu.org; Tue, 08 Aug 2023 11:51:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#64504] [PATCH] gnu: Add unsio. Resent-From: Andreas Enge Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 08 Aug 2023 15:51:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64504 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Iliya Tikhonenko Cc: 64504@debbugs.gnu.org, Sharlatan Hellseher , Efraim Flashner , Eric Bavier Received: via spool by 64504-submit@debbugs.gnu.org id=B64504.169150980416869 (code B ref 64504); Tue, 08 Aug 2023 15:51:01 +0000 Received: (at 64504) by debbugs.gnu.org; 8 Aug 2023 15:50:04 +0000 Received: from localhost ([127.0.0.1]:37580 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qTOyB-0004O0-I9 for submit@debbugs.gnu.org; Tue, 08 Aug 2023 11:50:04 -0400 Received: from hera.aquilenet.fr ([2a0c:e300::1]:34218) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qTOy9-0004NI-4s for 64504@debbugs.gnu.org; Tue, 08 Aug 2023 11:50:02 -0400 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 55E6BC30; Tue, 8 Aug 2023 17:49:53 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at hera.aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3MWzxwXdA5l7; Tue, 8 Aug 2023 17:49:52 +0200 (CEST) Received: from jurong (unknown [IPv6:2001:861:c4:f2f0::c64]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 08813390; Tue, 8 Aug 2023 17:49:51 +0200 (CEST) Date: Tue, 8 Aug 2023 17:49:50 +0200 From: Andreas Enge Message-ID: References: <521af611d0794672c19a4899e42eb5e448ab1c1f.1688681498.git.sharlatanus@gmail.com> <138b0fbd-ca5b-17ac-9c18-4d657737d4c0@mpe.mpg.de> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="+v1xSokPgEAKmxu7" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <138b0fbd-ca5b-17ac-9c18-4d657737d4c0@mpe.mpg.de> 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Queue-Id: 43DA3449FC X-Migadu-Scanner: mx1.migadu.com X-Spam-Score: -5.67 X-Migadu-Spam-Score: -5.67 X-TUID: yEd0D6Zwyinl --+v1xSokPgEAKmxu7 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit Am Tue, Aug 08, 2023 at 01:37:14PM +0200 schrieb Iliya Tikhonenko: > On 8/8/23 11:29, Andreas Enge wrote: > > For the #:build-type, the default value (release with debug information) also works and results in a package of the same size. Is there a reason to change it? Modified patch attached. > The debug build type is unnecessary verbose (see src/uns.cc line 71-73 for > an example) to the point that it impacts performance sometimes, which is > important considering the usecase of the library. Okay, I have reinstated your line and added a comment. > > I can also compile the package without the configure flags, are they useful? > Checked again, I still cannot compile it without -DCMAKE_CXX_STANDARD=14 I can... Patch attached. > > And there are lots of warnings about 34 bit shifts in a 32 bit type. > > But I suppose you tested that the library works. > I have not noticed any issues using it during the past two years, but this > cannot be considered a proper test because I am actually using a small > subset of the library. Perhaps, this warning should be reported upstream, > thanks! /tmp/guix-build-unsio-1.3.3-0.25e5246.drv-0/source/src/snapshotinterface.cc:125:45: warning: result of β€˜(-2147483648 << 2)’ requires 34 bits to represent, but β€˜int’ only has 32 bits [-Wshift-overflow=] 125 | req_bits = (unsigned int) (( 1 << 31 )<<2)-1; | ~~~~~~~~~~~~^~~~ Here is the offending line. This is indeed a bit surprising, as "int" usually has 32 bits. The 1 to be shifted is a signed int; 1*2^31 is not representable in the type, so if I understand the C standard correctly, the result is undefined. Then I have seen a Stackoverflow comment that it is okay in C++20. And indeed: #:configure-flags #~(list "-DCMAKE_CXX_STANDARD=20") passes without these warnings. Should we add this? Although such constructs look a bit brittle to me, and it is not suggested by the author. There is still the question about the lib64/ installation directory, I think this should be changed. Andreas --+v1xSokPgEAKmxu7 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: attachment; filename="0001-gnu-Add-unsio.patch" Content-Transfer-Encoding: 8bit >From ebfdbb4941d1151d15ecc0efb5aacdd3532b30cb Mon Sep 17 00:00:00 2001 Message-ID: From: Sharlatan Hellseher Date: Thu, 6 Jul 2023 23:13:05 +0100 Subject: [PATCH] gnu: Add unsio. * gnu/packages/astronomy.scm (unsio): New variable. Co-Authored-By: Iliya Tikhonenko Signed-off-by: Andreas Enge --- gnu/packages/astronomy.scm | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm index e5c318c8bf..e18e8bb21e 100644 --- a/gnu/packages/astronomy.scm +++ b/gnu/packages/astronomy.scm @@ -9,6 +9,7 @@ ;;; Copyright © 2021, 2022 Vinicius Monego ;;; Copyright © 2021 Greg Hogan ;;; Copyright © 2021 Foo Chuan Wei +;;; Copyright © 2023 Iliya Tikhonenko ;;; ;;; This file is part of GNU Guix. ;;; @@ -75,6 +76,7 @@ (define-module (gnu packages astronomy) #:use-module (gnu packages python-xyz) #:use-module (gnu packages qt) #:use-module (gnu packages readline) + #:use-module (gnu packages sqlite) #:use-module (gnu packages sphinx) #:use-module (gnu packages textutils) #:use-module (gnu packages time) @@ -3951,3 +3953,32 @@ (define-public python-wiimatch for optimal @code{matching} of weighted N-dimensional image intensity data using (multivariate) polynomials.") (license license:bsd-3))) + +(define-public unsio + ;; There is no versioned tag, use the latest commit. + (let ((commit "25e52468298e1194c9726ef5dba9d5fbb46870f5") + (revision "0")) + (package + (name "unsio") + (version (git-version "1.3.3" revision commit)) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://gitlab.lam.fr/infrastructure/unsio") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "110i2p5608zhh5w3pf3b5r2651hykw2ayspgq6vpqsffhya1p170")))) + (build-system cmake-build-system) + (arguments + (list #:tests? #f ;No tests + #:build-type "Release")) ; to improve performace + (inputs (list gfortran hdf5 perl sqlite zlib)) + (home-page "https://projets.lam.fr/projects/unsio/wiki") + (synopsis "Input and output routines for n-body file formats") + (description + "@acronym{UNSIO, Universal Nbody Snapshot Input Output} provides +an API for performing input and output operations on different kinds of +n-body file formats (nemo, Gadget binaries 1 and 2, Gadget hdf5, Ramses).") + (license license:cecill)))) base-commit: 782ef67a59f4b564f16101cf23c30a3777b3f734 -- 2.41.0 --+v1xSokPgEAKmxu7--