30 printf (
"Need arguments: gnunet-mpi-test <cmd> <cmd_args>");
33 if (MPI_SUCCESS != MPI_Init (&argc, &argv))
38 if (MPI_SUCCESS != MPI_Comm_size (MPI_COMM_WORLD, &ntasks))
43 if (MPI_SUCCESS != MPI_Comm_rank (MPI_COMM_WORLD, &rank))
70 for (cnt = 1; cnt < argc; cnt++)
71 argv2[cnt - 1] = argv[cnt];
74 NULL, NULL, argv2[0], argv2);
77 printf (
"Cannot exec\n");
103 (void) MPI_Finalize ();
106 printf (
"Something went wrong\n");
struct GNUNET_MessageHeader * msg
struct GNUNET_OS_Process * GNUNET_OS_start_process_vap(enum GNUNET_OS_InheritStdioFlags std_inheritance, struct GNUNET_DISK_PipeHandle *pipe_stdin, struct GNUNET_DISK_PipeHandle *pipe_stdout, struct GNUNET_DISK_PipeHandle *pipe_stderr, const char *filename, char *const argv[])
Start a process.
int GNUNET_OS_process_status(struct GNUNET_OS_Process *proc, enum GNUNET_OS_ProcessStatusType *type, unsigned long *code)
Retrieve the status of a process.
#define GNUNET_assert(cond)
Use this for fatal errors that cannot be handled.
static int ret
Return value of the commandline.
#define GNUNET_break(cond)
Use this for internal assertion violations that are not fatal (can be handled) but should not occur...
Use this option to have all of the standard streams (stdin, stdout and stderror) be inherited...
GNUNET_OS_ProcessStatusType
Process status types.
static char ** argv2
The arguments including the binary to spawn.
int int GNUNET_asprintf(char **buf, const char *format,...) __attribute__((format(printf
Like asprintf, just portable.
enum GNUNET_GenericReturnValue GNUNET_DISK_fn_write(const char *fn, const void *buf, size_t buf_size, enum GNUNET_DISK_AccessPermissions mode)
Write a buffer to a file atomically.
enum GNUNET_GenericReturnValue GNUNET_DISK_directory_remove(const char *filename)
Remove all files in a directory (rm -rf).
static struct GNUNET_PeerIdentity pid
Identity of the peer we transmit to / connect to.
#define LOG(kind,...)
Generic logging shorthand.
#define GNUNET_malloc(size)
Wrapper around malloc.
#define GNUNET_free(ptr)
Wrapper around free.