From unknown Sun Aug 17 04:21:19 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#77404] [PATCH 0/1] PETSc compiler optimization: Pass from -O1 to -O3 Resent-From: Luca Cirrottola Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 31 Mar 2025 10:43:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 77404 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 77404@debbugs.gnu.org Cc: Luca Cirrottola X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.17434177787978 (code B ref -1); Mon, 31 Mar 2025 10:43:04 +0000 Received: (at submit) by debbugs.gnu.org; 31 Mar 2025 10:42:58 +0000 Received: from localhost ([127.0.0.1]:40007 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tzCbZ-00024W-KL for submit@debbugs.gnu.org; Mon, 31 Mar 2025 06:42:58 -0400 Received: from lists.gnu.org ([2001:470:142::17]:37352) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tzCbW-00023d-RQ for submit@debbugs.gnu.org; Mon, 31 Mar 2025 06:42:55 -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 1tzCbQ-0008AM-F5 for guix-patches@gnu.org; Mon, 31 Mar 2025 06:42:49 -0400 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tzCbO-0000cv-I2 for guix-patches@gnu.org; Mon, 31 Mar 2025 06:42:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inria.fr; s=dc; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=HRytnT415ph0O0F4aGhw5sZ3Sui32V/iyKuTWRBKvkE=; b=XfmX1g3Wn+lnG+/PIlrmYW/v9/8Cb6R7tr12nFXwNrK4D7PFcBtgDKpM aVwyPu2tgIleyqpcp00lJ3XLnFZsK9DvfNTF/JEr6dNaWoOhYtT1Qfhfg iVQO1gCMCrEP/gLqU2TTBgTq7uD6op+doKIFMXZGAPZVYdpirAdrj9erG U=; Authentication-Results: mail3-relais-sop.national.inria.fr; dkim=none (message not signed) header.i=none; spf=SoftFail smtp.mailfrom=luca.cirrottola@inria.fr; dmarc=fail (p=none dis=none) d=inria.fr X-IronPort-AV: E=Sophos;i="6.14,290,1736809200"; d="scan'208";a="113027673" Received: from 14.114.133.77.rev.sfr.net (HELO canard..) ([77.133.114.14]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Mar 2025 12:42:40 +0200 From: Luca Cirrottola Date: Mon, 31 Mar 2025 12:42:17 +0200 Message-Id: <20250331104217.825384-1-luca.cirrottola@inria.fr> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=192.134.164.104; envelope-from=luca.cirrottola@inria.fr; helo=mail3-relais-sop.national.inria.fr X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello Guix, I have recently noticed that the "petsc" package raises the following warnings during the configuration phase, showing that the compiler only does O1 optimization for now: ============================================================================================= Configuring PETSc to compile on your system ============================================================================================= ============================================================================================= ***** WARNING ***** Using default C optimization flags "-g -O". You might consider manually setting optimal optimization flags for your system with COPTFLAGS="optimization flags" see config/examples/arch-*-opt.py for examples ============================================================================================= ============================================================================================= ***** WARNING ***** Using default Cxx optimization flags "-g". You might consider manually setting optimal optimization flags for your system with CXXOPTFLAGS="optimization flags" see config/examples/arch-*-opt.py for examples ============================================================================================= ============================================================================================= ***** WARNING ***** Using default FC optimization flags "-g -O". You might consider manually setting optimal optimization flags for your system with FOPTFLAGS="optimization flags" see config/examples/arch-*-opt.py for examples ============================================================================================= So here is a patch that follows the hints and passes the "-g -O3" flags to the COPTFLAGS, CXXOPTFLAGS and FOPTFLAGS variables. The package builds successfully on my machine. Some tests fail for both the packages "petsc" and "petsc-openmpi", but these were failing already with the "-O1" flag (so maybe this could be the topic of another issue). I am looking forward for your review. Cheers, Luca Luca Cirrottola (1): Activate higher compiler optimization for PETSc. gnu/packages/maths.scm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) base-commit: 4b97ae180fc13f7e4818cf48519f8a77c22c7797 -- 2.34.1 From unknown Sun Aug 17 04:21:19 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#77404] [PATCH 1/1] Activate higher compiler optimization for PETSc. References: <20250331104217.825384-1-luca.cirrottola@inria.fr> In-Reply-To: <20250331104217.825384-1-luca.cirrottola@inria.fr> Resent-From: Luca Cirrottola Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 31 Mar 2025 10:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 77404 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 77404@debbugs.gnu.org Cc: Luca Cirrottola Received: via spool by 77404-submit@debbugs.gnu.org id=B77404.17434178968823 (code B ref 77404); Mon, 31 Mar 2025 10:45:02 +0000 Received: (at 77404) by debbugs.gnu.org; 31 Mar 2025 10:44:56 +0000 Received: from localhost ([127.0.0.1]:40012 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tzCdT-0002IA-Oq for submit@debbugs.gnu.org; Mon, 31 Mar 2025 06:44:56 -0400 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:5754) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tzCdR-0002HT-4q for 77404@debbugs.gnu.org; Mon, 31 Mar 2025 06:44:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inria.fr; s=dc; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=/LuCZILV295kOR5U592kNIn25p05kJ+Kd9FQ8UN7mHI=; b=TxLmuBev+zM2gEqzUD2eCPckyG86cK9z/CsByy5LOTMg7EbE6fd5KXQP HHZXNPMl2Rpn/siq+CVHpFl01+n08m29ijCuYKXnF9VkYuBKRo3RPEcPy OpIbf9ZELuZHkkBOMlNyDwtFaxidjNJObwWL2IfzhRhvB0hZ0MaInjCI9 0=; Authentication-Results: mail3-relais-sop.national.inria.fr; dkim=none (message not signed) header.i=none; spf=SoftFail smtp.mailfrom=luca.cirrottola@inria.fr; dmarc=fail (p=none dis=none) d=inria.fr X-IronPort-AV: E=Sophos;i="6.14,290,1736809200"; d="scan'208";a="113027891" Received: from 14.114.133.77.rev.sfr.net (HELO canard..) ([77.133.114.14]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Mar 2025 12:44:45 +0200 From: Luca Cirrottola Date: Mon, 31 Mar 2025 12:44:35 +0200 Message-Id: <20250331104435.866960-1-luca.cirrottola@inria.fr> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) --- gnu/packages/maths.scm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm index 74c486b38a..fd0c940507 100644 --- a/gnu/packages/maths.scm +++ b/gnu/packages/maths.scm @@ -3658,7 +3658,10 @@ (define-public petsc #:test-target "test" #:parallel-build? #f ; build is parallel by default #:configure-flags - #~(list "--with-mpi=0" + #~(list "COPTFLAGS=-g -O3" + "CXXOPTFLAGS=-g -O3" + "FOPTFLAGS=-g -O3" + "--with-mpi=0" "--with-openmp=1" "--with-openblas=1" (string-append "--with-openblas-dir=" -- 2.34.1 From unknown Sun Aug 17 04:21:19 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Luca Cirrottola Subject: bug#77404: closed (Close) Message-ID: References: <20250331104217.825384-1-luca.cirrottola@inria.fr> X-Gnu-PR-Message: they-closed 77404 X-Gnu-PR-Package: guix-patches X-Gnu-PR-Keywords: patch Reply-To: 77404@debbugs.gnu.org Date: Mon, 31 Mar 2025 14:08:05 +0000 Content-Type: multipart/mixed; boundary="----------=_1743430085-2259-1" This is a multi-part message in MIME format... ------------=_1743430085-2259-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #77404: [PATCH 0/1] PETSc compiler optimization: Pass from -O1 to -O3 which was filed against the guix-patches package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 77404@debbugs.gnu.org. --=20 77404: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D77404 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1743430085-2259-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 77404-done) by debbugs.gnu.org; 31 Mar 2025 14:07:57 +0000 Received: from localhost ([127.0.0.1]:42214 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tzFnw-0000ZF-Ed for submit@debbugs.gnu.org; Mon, 31 Mar 2025 10:07:56 -0400 Received: from hera.aquilenet.fr ([185.233.100.1]:40706) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tzFmt-0000Nz-0h for 77404-done@debbugs.gnu.org; Mon, 31 Mar 2025 10:06:51 -0400 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 9B2E83FB; Mon, 31 Mar 2025 16:06:44 +0200 (CEST) Authentication-Results: hera.aquilenet.fr; none X-Virus-Scanned: Debian amavis at hera.aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavis, port 10024) with ESMTP id eKv9sQudYRWK; Mon, 31 Mar 2025 16:06:44 +0200 (CEST) Received: from jurong (176-179-191-150.abo.bbox.fr [176.179.191.150]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 99007166; Mon, 31 Mar 2025 16:06:43 +0200 (CEST) Date: Mon, 31 Mar 2025 16:06:42 +0200 From: Andreas Enge To: 77404-done@debbugs.gnu.org Subject: Close Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Rspamd-Queue-Id: 9B2E83FB X-Spamd-Result: default: False [5.88 / 15.00]; SPAM_FLAG(5.00)[]; NEURAL_SPAM(3.00)[1.000]; BAYES_HAM(-2.52)[97.82%]; MID_RHS_NOT_FQDN(0.50)[]; MIME_GOOD(-0.10)[text/plain]; MIME_TRACE(0.00)[0:+]; FROM_HAS_DN(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; ARC_NA(0.00)[] X-Spam-Level: ***** X-Rspamd-Action: greylist X-Spamd-Bar: +++++ X-Rspamd-Server: hera X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 77404-done Cc: Luca Cirrottola X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello, thanks for the patch! I have pushed it after adapting the commit message to our coding standards. Andreas ------------=_1743430085-2259-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 31 Mar 2025 10:42:58 +0000 Received: from localhost ([127.0.0.1]:40007 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tzCbZ-00024W-KL for submit@debbugs.gnu.org; Mon, 31 Mar 2025 06:42:58 -0400 Received: from lists.gnu.org ([2001:470:142::17]:37352) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tzCbW-00023d-RQ for submit@debbugs.gnu.org; Mon, 31 Mar 2025 06:42:55 -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 1tzCbQ-0008AM-F5 for guix-patches@gnu.org; Mon, 31 Mar 2025 06:42:49 -0400 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tzCbO-0000cv-I2 for guix-patches@gnu.org; Mon, 31 Mar 2025 06:42:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inria.fr; s=dc; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=HRytnT415ph0O0F4aGhw5sZ3Sui32V/iyKuTWRBKvkE=; b=XfmX1g3Wn+lnG+/PIlrmYW/v9/8Cb6R7tr12nFXwNrK4D7PFcBtgDKpM aVwyPu2tgIleyqpcp00lJ3XLnFZsK9DvfNTF/JEr6dNaWoOhYtT1Qfhfg iVQO1gCMCrEP/gLqU2TTBgTq7uD6op+doKIFMXZGAPZVYdpirAdrj9erG U=; Authentication-Results: mail3-relais-sop.national.inria.fr; dkim=none (message not signed) header.i=none; spf=SoftFail smtp.mailfrom=luca.cirrottola@inria.fr; dmarc=fail (p=none dis=none) d=inria.fr X-IronPort-AV: E=Sophos;i="6.14,290,1736809200"; d="scan'208";a="113027673" Received: from 14.114.133.77.rev.sfr.net (HELO canard..) ([77.133.114.14]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Mar 2025 12:42:40 +0200 From: Luca Cirrottola To: guix-patches@gnu.org Subject: [PATCH 0/1] PETSc compiler optimization: Pass from -O1 to -O3 Date: Mon, 31 Mar 2025 12:42:17 +0200 Message-Id: <20250331104217.825384-1-luca.cirrottola@inria.fr> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=192.134.164.104; envelope-from=luca.cirrottola@inria.fr; helo=mail3-relais-sop.national.inria.fr X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: submit Cc: Luca Cirrottola X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello Guix, I have recently noticed that the "petsc" package raises the following warnings during the configuration phase, showing that the compiler only does O1 optimization for now: ============================================================================================= Configuring PETSc to compile on your system ============================================================================================= ============================================================================================= ***** WARNING ***** Using default C optimization flags "-g -O". You might consider manually setting optimal optimization flags for your system with COPTFLAGS="optimization flags" see config/examples/arch-*-opt.py for examples ============================================================================================= ============================================================================================= ***** WARNING ***** Using default Cxx optimization flags "-g". You might consider manually setting optimal optimization flags for your system with CXXOPTFLAGS="optimization flags" see config/examples/arch-*-opt.py for examples ============================================================================================= ============================================================================================= ***** WARNING ***** Using default FC optimization flags "-g -O". You might consider manually setting optimal optimization flags for your system with FOPTFLAGS="optimization flags" see config/examples/arch-*-opt.py for examples ============================================================================================= So here is a patch that follows the hints and passes the "-g -O3" flags to the COPTFLAGS, CXXOPTFLAGS and FOPTFLAGS variables. The package builds successfully on my machine. Some tests fail for both the packages "petsc" and "petsc-openmpi", but these were failing already with the "-O1" flag (so maybe this could be the topic of another issue). I am looking forward for your review. Cheers, Luca Luca Cirrottola (1): Activate higher compiler optimization for PETSc. gnu/packages/maths.scm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) base-commit: 4b97ae180fc13f7e4818cf48519f8a77c22c7797 -- 2.34.1 ------------=_1743430085-2259-1--