Simple MPI-based SSG program failing
Trying out this simple SSG program with the version of ssg that Spack installs by default right now (0.3.0):
#include <margo.h>
#include <ssg.h>
#include <ssg-mpi.h>
#include <mpi.h>
#include <unistd.h>
int main(int argc, char** argv) {
MPI_Init(&argc, &argv);
margo_instance_id mid = margo_init("na+sm", MARGO_SERVER_MODE, 1, -1);
ssg_init(mid);
ssg_group_id_t gid = ssg_group_create_mpi("mygroup", MPI_COMM_WORLD, NULL, NULL);
ssg_group_leave(gid);
ssg_finalize();
margo_finalize(mid);
MPI_Finalize();
}
Running it on a local machine with 4 ranks gives me this:
# HG -- Warning -- /tmp/mdorier/spack-stage/mercury-master-7bbslxovmxwec4veom2zifkt5fgkc4fn/spack-src/src/mercury_core.c:2703
# hg_core_process(): Could not find RPC ID in function map
and the program hangs.
If I use 0 for the third argument of margo_init
(no progress thread), I get this:
# HG -- Warning -- /tmp/mdorier/spack-stage/mercury-master-7bbslxovmxwec4veom2zifkt5fgkc4fn/spack-src/src/mercury_core.c:2703
# hg_core_process(): Could not find RPC ID in function map
# HG -- Error -- /tmp/mdorier/spack-stage/mercury-master-7bbslxovmxwec4veom2zifkt5fgkc4fn/spack-src/src/mercury_core.c:1239
# hg_core_finalize(): HG addrs must be freed before finalizing HG (3 remaining)
# HG -- Error -- /tmp/mdorier/spack-stage/mercury-master-7bbslxovmxwec4veom2zifkt5fgkc4fn/spack-src/src/mercury_core.c:3616
# HG_Core_finalize(): Cannot finalize HG core layer
# HG -- Error -- /tmp/mdorier/spack-stage/mercury-master-7bbslxovmxwec4veom2zifkt5fgkc4fn/spack-src/src/mercury.c:1120
# HG_Finalize(): Could not finalize HG core class
and the program hangs.
If I use "ofi+tcp" instead of "na+sm", and enable a progress thread, the program hangs.
If I don't use a progress loop, I get the following error:
# HG -- Error -- /tmp/mdorier/spack-stage/mercury-master-7bbslxovmxwec4veom2zifkt5fgkc4fn/spack-src/src/mercury_core.c:1239
# hg_core_finalize(): HG addrs must be freed before finalizing HG (3 remaining)
# HG -- Error -- /tmp/mdorier/spack-stage/mercury-master-7bbslxovmxwec4veom2zifkt5fgkc4fn/spack-src/src/mercury_core.c:3616
# HG_Core_finalize(): Cannot finalize HG core layer
# HG -- Error -- /tmp/mdorier/spack-stage/mercury-master-7bbslxovmxwec4veom2zifkt5fgkc4fn/spack-src/src/mercury.c:1120
# HG_Finalize(): Could not finalize HG core class
and the program hangs.