NewMadeleine

Documentation

nm_launcher_mini.c
/*
* NewMadeleine
* Copyright (C) 2017-2024 (see AUTHORS file)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or (at
* your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*/
#include <stdio.h>
int main(int argc, char**argv)
{
int rc = nm_launcher_init(&argc, argv);
if(rc != NM_ESUCCESS)
{
fprintf(stderr, "error in nm_launcher_init()\n");
}
int rank = -1, size = -1;
printf("rank = %d; size = %d\n", rank, size);
nm_session_open(&p_session, "launcher-mini");
return 0;
}
@ NM_ESUCCESS
successful operation
Definition: nm_errno.h:34
int nm_launcher_get_rank(int *rank)
Returns process rank.
int nm_launcher_get_size(int *size)
Returns the number of nodes.
int nm_launcher_exit(void)
Cleans session.
static int nm_launcher_init(int *argc, char **argv)
Initializes nmad.
int nm_session_open(nm_session_t *pp_session, const char *label)
Open a new session, assuming processes are already connected.
int nm_session_close(nm_session_t p_session)
Disconnect and destroy a session.
static nm_session_t p_session
nm_len_t size
size of the onsided data (not incuding target-side completion)