KMR
Macros | Functions | Variables
kmrspawn.c File Reference

Static-Spawning Interface. More...

#include <mpi.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <errno.h>
#include <dlfcn.h>
#include <assert.h>
#include "kmrspawn.h"
#include "kmr.h"
#include "kmrimpl.h"

Go to the source code of this file.

Macros

#define KMR_LIBAPI(FN)   FN ## _standin
 
#define KMR_MAIN_LIBRARY   (1)
 
#define kmr_mpi_byte   MPI_BYTE
 
#define kmr_mpi_comm_null   MPI_COMM_NULL
 
#define KMR_NO_STATIC_SPAWNING
 
#define kmr_spawn_mpi_comm_dup   MPI_Comm_dup
 
#define kmr_spawn_mpi_comm_free   MPI_Comm_free
 
#define kmr_spawn_mpi_comm_rank   MPI_Comm_rank
 
#define kmr_spawn_mpi_comm_set_name   MPI_Comm_set_name
 
#define kmr_spawn_mpi_comm_size   MPI_Comm_size
 
#define kmr_spawn_mpi_get_count   MPI_Get_count
 
#define kmr_spawn_mpi_intercomm_create   MPI_Intercomm_create
 
#define kmr_spawn_mpi_recv   MPI_Recv
 
#define kmr_spawn_mpi_send   MPI_Send
 
#define kmr_spawn_true_exit   exit
 
#define kmr_spawn_true_mpi_finalize   MPI_Finalize
 

Functions

static int kmr_spawn_clean_process (struct kmr_spawn_hooks *hooks)
 
static int kmr_spawn_exec_command (struct kmr_spawn_hooks *hooks, int argc, char **argv)
 
int kmr_spawn_hookup_standin (struct kmr_spawn_hooks *hooks)
 
static int kmr_spawn_join_to_master (struct kmr_spawn_hooks *hooks, struct kmr_spawn_work *w, size_t msglen)
 
static int kmr_spawn_make_argv_printable (char *s, size_t sz, char **argv)
 
void KMR_LIBAPI() kmr_spawn_service (struct kmr_spawn_hooks *hooks, int status)
 
void KMR_LIBAPI() kmr_spawn_set_verbosity (struct kmr_spawn_hooks *hooks, int level)
 
int KMR_LIBAPI() kmr_spawn_setup (struct kmr_spawn_hooks *hooks, MPI_Comm basecomm, int masterrank, int(*execfn)(struct kmr_spawn_hooks *hooks, int argc, char **argv), int nsubworlds, MPI_Comm subworlds[], unsigned long colors[], size_t argssize)
 
static int kmr_spawn_start_work (struct kmr_spawn_hooks *hooks, struct kmr_spawn_work *w, size_t msglen)
 

Variables

static struct kmr_spawn_hookskmr_fake_spawn_hooks = 0
 

Detailed Description

Static-Spawning Interface.

This is a part of the spawning library (https://github.com/riken-rccs/mpispawner). See also the source code of the KMR map-reduce library for the use of spawning (https://github.com/riken-rccs/kmr). It is the worker-side of the master-worker protocol, and the master-side is in "kmrwfmap.c" in KMR. Note that this code is also included in KMR to implement a dummy spawning for testing.

Definition in file kmrspawn.c.