Initializing SSGΒΆ

The following code sample shows how to initialize and finalize SSG.

main.c (show/hide)

#include <assert.h>
#include <stdio.h>
#include <ssg.h>

int main(int argc, char** argv)
{
    margo_instance_id mid = margo_init("tcp", MARGO_SERVER_MODE, 1, 0);
    assert(mid);

    int ret = ssg_init();
    assert(ret == SSG_SUCCESS);

    ret = ssg_finalize();
    assert(ret == SSG_SUCCESS);

    margo_finalize(mid);

    return 0;
}

Important

Though the Margo instance is not provided to the ssg_init function, this function still needs Margo to have been initialized.