From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41980) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e6Iv0-0000FF-12 for guix-patches@gnu.org; Sun, 22 Oct 2017 12:16:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e6Iuw-0006M7-R1 for guix-patches@gnu.org; Sun, 22 Oct 2017 12:16:06 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:47398) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e6Iuw-0006M0-NF for guix-patches@gnu.org; Sun, 22 Oct 2017 12:16:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1e6Iuw-0000lA-Dt for guix-patches@gnu.org; Sun, 22 Oct 2017 12:16:02 -0400 Subject: [bug#28593] [PATCH] gnu: openfoam: Clean up to reduce closure. Resent-Message-ID: From: Dave Love References: <20170925104459.17798-1-fx@gnu.org> <87fubbj5yr.fsf@gnu.org> <1506426036.2423.32.camel@tourbillion-technology.com> <873779hdci.fsf@gnu.org> <87o9piit59.fsf@gnu.org> <1507547167.17241.18.camel@tourbillion-technology.com> Date: Sun, 22 Oct 2017 17:15:09 +0100 In-Reply-To: <1507547167.17241.18.camel@tourbillion-technology.com> (Paul Garlick's message of "Mon, 9 Oct 2017 12:06:07 +0100") Message-ID: <874lqrjh0y.fsf@albion.it.manchester.ac.uk> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="Yukon-Rand-Corporation-password-AVIP-South-Africa" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Paul Garlick Cc: 28593@debbugs.gnu.org --Yukon-Rand-Corporation-password-AVIP-South-Africa Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Paul Garlick writes: > ii) deleting object files, to save disk space, under > 'platforms/linux64GccDPInt32Opt/src' should also be fine, with the > proviso that the re-compilation process should be checked before > committing. =A0There is an example procedure, albeit for an earlier > version, given at=A0https://openfoamwiki.net/index.php/How_to_add_tempera > ture_to_icoFoam=A0. =A0A slightly modified procedure should work for > version 4.1. > > Dave, can you try this on your patched version? =A0'wmake' should re- > generate the object files that are needed and produce a new executable. > =A0Check that there are no instances of errors such as 'file not found' I successfully rebuilt pisoFoam following the example in the current documentation. Is that good enough? Here's a modified patch to change the comment and avoid an empty directory. --Yukon-Rand-Corporation-password-AVIP-South-Africa Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-gnu-openfoam-Clean-up-to-reduce-closure.patch >From dc88db3e91c70da5e6e557ed5fdd528499cb1c65 Mon Sep 17 00:00:00 2001 From: Dave Love Date: Sat, 21 Oct 2017 17:20:42 +0100 Subject: [PATCH] gnu: openfoam: Clean up to reduce closure. This saves ~1GB. * gnu/packages/simulation.scm (openfoam)[outputs]: Add debug. [arguments]: Clean up .o and src after build. --- gnu/packages/simulation.scm | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/gnu/packages/simulation.scm b/gnu/packages/simulation.scm index de07b6844..3e65d1687 100644 --- a/gnu/packages/simulation.scm +++ b/gnu/packages/simulation.scm @@ -84,6 +84,10 @@ `(("gzip" ,gzip) ("gnuplot" ,gnuplot) ("openmpi" ,openmpi))) + ;; FIXME: Also separate tutorials (80MB) and src (60MB); maybe also doc + ;; (8MB) + (outputs '("debug" ;~60MB + "out")) (arguments `( ;; Executable files and shared libraries are located in the 'platforms' ;; subdirectory. @@ -171,6 +175,15 @@ (("lockDir=.*$") "lockDir=$HOME/.$WM_PROJECT/.wmake\n")) #t)) + (add-after 'build 'cleanup + ;; Avoid unncessary, voluminous object and dep files + (lambda _ + (delete-file-recursively + "platforms/linux64GccDPInt32Opt/src") + (delete-file-recursively + "platforms/linux64GccDPInt32OptSYSTEMOPENMPI") + (zero? + (system* "find" "-name" "*.o" "-delete")))) (replace 'install (lambda _ ;; use 'OpenFOAM-version' convention -- 2.11.0 --Yukon-Rand-Corporation-password-AVIP-South-Africa--