* how to build / pack / distribute / run a simple mpi program
@ 2021-06-03 13:53 Jason Addison
0 siblings, 0 replies; only message in thread
From: Jason Addison @ 2021-06-03 13:53 UTC (permalink / raw)
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
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
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
Also, I tried to ask on Guix irc and a package definition file like
this was proposed:
(source (local-file "ring_c.c"))
(let ((source (assoc-ref %build-inputs "source"))
(out (assoc-ref %outputs "out")))
(invoke "mpicc" "-o"
(string-append (assoc-ref %outputs "out") "/ring_c")
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!
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-06-03 20:37 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-03 13:53 how to build / pack / distribute / run a simple mpi program Jason Addison
unofficial mirror of firstname.lastname@example.org
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://yhetil.org/guix-science/0 guix-science/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 guix-science guix-science/ https://yhetil.org/guix-science \
Example config snippet for mirrors.
Newsgroup available over NNTP:
AGPL code for this site: git clone http://ou63pmih66umazou.onion/public-inbox.git