From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludovic.courtes@inria.fr (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: Open MPI keeps references to GCC, GFortran, etc. Date: Fri, 28 Jul 2017 10:10:49 +0200 Message-ID: <87poclm16e.fsf@inria.fr> References: <87vame5jgd.fsf@gnu.org> <87d18mhu2f.fsf@i-ulialbion.it.manchester.ac.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:49091) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1db0Mi-0004xu-DG for guix-devel@gnu.org; Fri, 28 Jul 2017 04:11:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1db0Mf-0003hE-RS for guix-devel@gnu.org; Fri, 28 Jul 2017 04:11:20 -0400 In-Reply-To: <87d18mhu2f.fsf@i-ulialbion.it.manchester.ac.uk> (Dave Love's message of "Thu, 27 Jul 2017 14:45:44 +0100") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Dave Love Cc: guix-devel , Ricardo Wurmus , Eric Bavier Hi, Dave Love skribis: > Ludovic Court=C3=A8s writes: > >> Hello, >> >> Open=C2=A0MPI retains references to GCC, GFortran, etc., which significa= ntly >> increases its closure size. > > My query about cycles from separating the lib output was from looking at > basically this. There should be a runtime package for compute nodes and > a development one (as "openmpi" and "openmpi-devel" in Fedora). Interesting. It=E2=80=99s not a =E2=80=9Cshould=E2=80=9D though IMO, in th= e sense that we add additional inputs only when we have a good reason to do so. For example, in most cases, a =E2=80=9Cdoc=E2=80=9D output would only save you = a few KiB of man pages, representing .1% of the package size, so we don=E2=80=99t add a = =E2=80=9Cdoc=E2=80=9D output in those cases. This is different from the Fedora/Debian approach where packages are systematically split in several outputs. The =E2=80=9CSubmitting Patches=E2=80=9D section of the manual mentions thi= s. In the case of Open MPI, adding a =E2=80=9Clib=E2=80=9D output wouldn=E2=80= =99t help: =E2=80=9Cout=E2=80=9D would still refer to gfortran via =E2=80=98ompi_info=E2=80=99, and =E2=80= =9Clib=E2=80=9D would refer to gfortran via opal_config.h. Hence my suggestion to simply remove the reference to gfortran & co. > [It's not the only example of monstrous dependencies I've noticed > trying to build things.] Yeah I think it=E2=80=99s easy to overlook this when working on packages, b= ut we should constantly pay attention to this with =E2=80=98guix size=E2=80=99. >> The references come from cpp macros such as OMPI_FC_ABSOLUTE (absolute >> file name of the Fortran compiler), defined in opal_config.h and >> returned by command-line tools =E2=80=98ompi_info=E2=80=99 and =E2=80=98= oshmem_info=E2=80=99. > > I'm confused what the wrappers are doing, The two commands return the actual compiler names, not the names of wrappers: --8<---------------cut here---------------start------------->8--- $ $(guix build openmpi)/bin/ompi_info [...] C compiler: gcc C compiler absolute: /gnu/store/zlyn8z138s2vv86bdx9d72kchjczv0xn-gcc-5= .4.0/bin/gcc C compiler family name: GNU C compiler version: 5.4.0 C++ compiler: g++ C++ compiler absolute: /gnu/store/zlyn8z138s2vv86bdx9d72kchjczv0xn-gcc-5= .4.0/bin/g++ Fort compiler: gfortran Fort compiler abs: /gnu/store/vcx02xlp6s92bxrcafnpw7hnqa4kc32b-gfort= ran-5.4.0/bin/gfortran Fort ignore TKR: yes (!GCC$ ATTRIBUTES NO_ARG_CHECK ::) --8<---------------cut here---------------end--------------->8--- AIUI, this is =E2=80=9Cpurely informational=E2=80=9D. Replacing the absolu= te file names with just the base name won=E2=80=99t break anything. Except that there=E2= =80=99s always the possibility of scripts or tools out there parsing the output of =E2=80=98ompi_info=E2=80=99. Thus my question was: do people really par= se the output of these commands, or can we safely assume that third-party programs don=E2=80=99t rely on these absolute file names? > I was intending to look at parameterizing the build on gfortran version, I suppose you could to: (define openmpi-with-gfortran7 (package (inherit openmpi) (name "openmpi-gfortran7") (inputs `(("gfortran" ,gfortran-7) ,@(alist-delete "gfortran" (package-inputs openmpi)))))) (That said, if the .mod files are compatible among gfortran versions, it probably doesn=E2=80=99t make sense to do this.) WDYT? Ludo=E2=80=99.