8 #define LOG(kind, ...) \
9 GNUNET_log_from (kind, "gnunet-mpi-test", __VA_ARGS__)
12 main (
int argc,
char *argv[])
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
static int ret
Return value of the commandline.
static struct GNUNET_PeerIdentity pid
Identity of the peer we transmit to / connect to.
int main(int argc, char *argv[])
#define LOG(kind,...)
Generic logging shorthand.
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).
@ GNUNET_DISK_PERM_USER_READ
Owner can read.
@ GNUNET_DISK_PERM_GROUP_READ
Group can read.
@ GNUNET_DISK_PERM_GROUP_WRITE
Group can write.
@ GNUNET_DISK_PERM_USER_WRITE
Owner can write.
#define GNUNET_assert(cond)
Use this for fatal errors that cannot be handled.
#define GNUNET_break(cond)
Use this for internal assertion violations that are not fatal (can be handled) but should not occur.
@ GNUNET_ERROR_TYPE_WARNING
int int GNUNET_asprintf(char **buf, const char *format,...) __attribute__((format(printf
Like asprintf, just portable.
#define GNUNET_malloc(size)
Wrapper around malloc.
#define GNUNET_free(ptr)
Wrapper around free.
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.
GNUNET_OS_ProcessStatusType
Process status types.
enum GNUNET_GenericReturnValue GNUNET_OS_process_status(struct GNUNET_OS_Process *proc, enum GNUNET_OS_ProcessStatusType *type, unsigned long *code)
Retrieve the status of a process.
@ GNUNET_OS_INHERIT_STD_ALL
Use this option to have all of the standard streams (stdin, stdout and stderror) be inherited.