From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id jyRVDn49uWBVLwAAgWs5BA (envelope-from ) for ; Thu, 03 Jun 2021 22:37:18 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id aHDsCH49uWBzSwAAbx9fmQ (envelope-from ) for ; Thu, 03 Jun 2021 20:37:18 +0000 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 B99612F723 for ; Thu, 3 Jun 2021 22:37:17 +0200 (CEST) Received: from localhost ([::1]:53238 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lou5c-00081Z-Ox for larch@yhetil.org; Thu, 03 Jun 2021 16:37:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54870) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lonnV-0000fT-Be for guix-science@gnu.org; Thu, 03 Jun 2021 09:54:09 -0400 Received: from mail-ed1-x536.google.com ([2a00:1450:4864:20::536]:35535) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lonnS-0002xi-5V for guix-science@gnu.org; Thu, 03 Jun 2021 09:54:09 -0400 Received: by mail-ed1-x536.google.com with SMTP id ba2so5489345edb.2 for ; Thu, 03 Jun 2021 06:54:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=tRPgqRqik5bTIGbGlv4gf9q9HFiM9GCWMYDqh5p46Ow=; b=TXid6D0kbxvWytAu6gklp5DqqTCpgYT7xqo2SNkK7kcFljQ9iNYrwFWWV+Tk2q4zxQ 8Bgax3FbT75WbREdQdAIjjLxiPMuIqIrH+8R3uu4O8J4XZSyJEU6dknW2lArlb90ktSc QPql6cFyXguqz/Uphe6s1LxnKKztuWeP+N1jOT931Q78kiUYH7muTPNOsUT630KMWAIS 3/rCKc6daYdjBoxGWezT47YM1EF7By0p+z6+jmSi8922+kBO1sh3SIxR6qq/yzvmK/WJ 53l44Z1n5F7zxRqx3iooDV/aNoVLubwlb7Q7CnYc/jzw8Z23a+an59wA3SZ7NATWQNYR omPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=tRPgqRqik5bTIGbGlv4gf9q9HFiM9GCWMYDqh5p46Ow=; b=EpM17cFB+pjKQ77mt3GkKuqMoAYuCmuYgGhGHlqkHTCy7qizH/4aYrHJ0EkCuQMQR9 TcJggm3osNtDX3RDhMDorYi98t7LlPyTFyOI27dHD6c9vw/x7FyX44KyWApYsdifr1Pw KvUYnZ1Uu9kc0Yx20f83YDmudq8WNZclPOv40ItpgdRJEn01bYHrs3DS+q5VzP15PoN/ e1nOJM9i1E/forBloiaK0AeoNAHDhRbRRTlxLCnZ8rWogePpbsLOsb276qh99N3u4PLt fC4GKqGyUKj3pI2F1WnzfRLmb2XuqdYhPnRbL9eCjyek5S3Tik/OjhcpN86POoEABrSY 28Cg== X-Gm-Message-State: AOAM5313qb3h+CLP2ZqODHOA61/f+fKm8D9jjXddi7ahsvU16U5tekgH 0BHFgWWgKuUgIFHCxo/ybQxEchR7P8UZskq9P7SqZFkV X-Google-Smtp-Source: ABdhPJzKVlJIrlcuEKy8eBKepco0Om/nh6HWGXiww7zbtQ1/cgbEWq0ycziqgFtzSGh1VKS0s01xULak0Xcds8FCtdU= X-Received: by 2002:a50:fd0a:: with SMTP id i10mr5640390eds.78.1622728444323; Thu, 03 Jun 2021 06:54:04 -0700 (PDT) MIME-Version: 1.0 From: Jason Addison Date: Thu, 3 Jun 2021 07:53:52 -0600 Message-ID: Subject: how to build / pack / distribute / run a simple mpi program To: guix-science@gnu.org Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=2a00:1450:4864:20::536; envelope-from=jraddison@gmail.com; helo=mail-ed1-x536.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Thu, 03 Jun 2021 16:36:20 -0400 X-BeenThere: guix-science@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-science-bounces+larch=yhetil.org@gnu.org Sender: "Guix-Science" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1622752637; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=tRPgqRqik5bTIGbGlv4gf9q9HFiM9GCWMYDqh5p46Ow=; b=eIswgEy7smfbqcGshirfTtZAJxSsg9r0Npx+ZTECL8yTzJ1U6iwOQYx6/h+CQRQ9ncbeiA rVq70ZPV/SE7BHZZWQSM881EQGvzvUwHS+oLUx4I6Zj3ah2GiPQ2mwMPVO9XJJcwsBnH6p NgPdNni23NRW1LUV5DDVdSrE02m8H80WXUFbjnGxxYFEy1R0buWT+zoBJOgyjJsttQ9CGW 3xRHoRLQZUZ+YZeOKP+dADFeMJUKmJSDzImT+68gBEtShZuqlNZzvjC4rw8Z/l1YxS7O5X hB1AmAIkwYve3MCUXNsBFUSn3OxgZtqDsbUyRalNz9pE440WLPyP/MBZBPipeQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1622752637; a=rsa-sha256; cv=none; b=CznSzwQOftEJg2vFdtB3hgH6ucIXQjI2cVveKcdanGlZBrr6ENOrB/AGX75uY/zg6NpgGt pbxilX8d1seQkRBYP2GUqYtyckCOgp3v5MmGDtPJJ2fWE0+QnWCieuedem2NmmkV8+c5Xp nhLXSeKt/nPgIncY7vYrR7u/KiM/VbPN+SKygb2YKQquZE4pu+RerUQSgufQcOiX4FTho5 9d1fh4cs+bFXRMj7S82fjnmVzp6Z/BLAO4qZ6GbNld/KwZ7GxZMSY/eoVBDJhMDzWkVYBn fqrvCoC2nsSMMxORi30XgCi/E2kcP1kN+0KAu192KCSc5Y99SR9UpCLIBdfTvQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=TXid6D0k; spf=pass (aspmx1.migadu.com: domain of guix-science-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-science-bounces@gnu.org X-Migadu-Spam-Score: -3.13 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=TXid6D0k; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of guix-science-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-science-bounces@gnu.org X-Migadu-Queue-Id: B99612F723 X-Spam-Score: -3.13 X-Migadu-Scanner: scn0.migadu.com X-TUID: ZqdFzK+Re/gI I'm struggling with how to build / pack / distribute / run a simple mpi example from my system with guix to an hpc system without Guix. I know how to accomplish this with Singularity, but I'm not sure what is the best way to do it with Guix. Also, there are pretty good instructions / examples for how to pack / containerize existing guix packages, but I have not been able to find an example for not-already-packaged code. High-level requirements might look something like this: 1- mpich ABI: build against and distribute with mpich. 2- mpi example application, one of the simple examples distributed with openmpi: openmpi/examples/ring_c.c, built like `mpicc -o ring_c ring_c.c`. 3- target systems that use PBSpro batch scheduler. This might not be important, but it might impact how ring_c is launched. Do I need to turn ring_c into its own full-on package and add it to my local guix system and then pack it from there? Should I create an environment, build ring_c with it, and then pack the environment separately, copy the environment pack and the ring_c app to the hpc system and try to run ring_c under the environment pack? I guess I wouldn't really want to have to copy around all of the dev packages if not needed at runtime. With Singularity, you need to use the host system's mpiexec to run the mpi app in your container; I guess so that the host can orchestrate the mpi jobs properly. Is the same true when using a Guix tarball pack? Anyway, it seems like packing one-off or in-development apps to run on non-Guix hpc systems would be a pretty common task and that there is a best practice. I'm probably just not familiar enough with guix to see the obvious. Also, I tried to ask on Guix irc and a package definition file like this was proposed: (package (name "ring_c") (version "1") (source (local-file "ring_c.c")) (build-system trivial-build-system) (arguments `(#:builder (begin (let ((source (assoc-ref %build-inputs "source")) (out (assoc-ref %outputs "out"))) (mkdir-p out) (invoke "mpicc" "-o" (string-append (assoc-ref %outputs "out") "/ring_c") source)))) (home-page "") (synopsis "") (description "") (license #f)) Is this the right approach? I tried to work with it a bit. It failed on "invoke". Is that in a module somewhere? Also, should there be "propagated-inputs" entry with mpich in this? Is there a way to just get the runtime mpich stuff and not include all the build/dev stuff? Thank you very much for your attention. I'm really hoping I can move away from Singularity and transition my work to Guix! -Jason