From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?Q?Todor_Kondi=C4=87?= Subject: Re: Guix and openmpi in a container environment Date: Mon, 27 Jan 2020 10:54:59 +0000 Message-ID: References: Reply-To: =?UTF-8?Q?Todor_Kondi=C4=87?= Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:45893) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iw22x-00054d-Ru for help-guix@gnu.org; Mon, 27 Jan 2020 05:55:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iw22w-0005k5-CW for help-guix@gnu.org; Mon, 27 Jan 2020 05:55:11 -0500 Received: from mail-40134.protonmail.ch ([185.70.40.134]:64490) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iw22v-0005gm-MQ for help-guix@gnu.org; Mon, 27 Jan 2020 05:55:10 -0500 In-Reply-To: List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane-mx.org@gnu.org Sender: "Help-Guix" To: =?UTF-8?Q?Todor_Kondi=C4=87?= Cc: "help-guix\\\\@gnu.org" =E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90 Original Me= ssage =E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90 On Sunday, 19 January 2020 11:25, Todor Kondi=C4=87 wrote: > I am getting mpirun errors when trying to execute a simple > > mpirun -np 1 program > > (where program is e.g. 'ls') command in a container environment. > > The error is usually: > > All nodes which are allocated for this job are already filled. > > which makes no sense, as I am trying this on my workstation (single socke= t, four cores -- your off-the-shelf i5 cpu) and no scheduling system enable= d. > > I set up the container with this command: > > guix environment -C -N --ad-hoc -m default.scm > > where default.scm: > > (use-modules (guix packages)) > (specifications->manifest > `(;; Utilities > "less" > "bash" > "make" > "openssh" > "guile" > "nano" > "glibc-locales" > "gcc-toolchain@7.4.0" > "gfortran-toolchain@7.4.0" > "python" > "openmpi" > "fftw" > "fftw-openmpi" > ,@(map (lambda (x) (package-name x)) %base-packages))) > > Simply installing openmpi (guix package -i openmpi) in my usual Guix prof= ile just works out of the box. So, there has to be some quirk where the ope= nmpi container installation is blind to some settings within the usual envi= ronment. For the environment above, if the mpirun invocation is changed to provide the hostname mpirun --host $HOSTNAME:4 -np 4 ls ls is executed in four processes and the output is four times the contents = of the current directory as expected. Of course, ls is not an MPI program. However, testing this elementary fortr= an MPI code, --- program testrun2 use mpi implicit none integer :: ierr call mpi_init(ierr) call mpi_finalize(ierr) end program testrun2 --- fails with runtime errors on any number of processes. The compilation line was: mpif90 test2.f90 -o testrun2 The mpirun command: mpirun --host $HOSTNAME:4 -np 4 Let me reiterate, there is no need to declare the host and its maximal numb= er of slots in the normal user environment. Also, the runtime errors are go= ne. Could it be that the openmpi package needs a few other basic dependencies n= ot present in the package declaration for the particular case of a single n= ode (normal PC) machine? Also, I noted that gfortran/mpif90 ignores "CPATH" and "LIBRARY_PATH" env v= ariables. I had to specify this explicitly via -I and -L flags to the compi= ler.