N-sim
Emulation and simulation of
Wireless Sensor Networks



   Home


   Project Page


   Download


   CVS



   Installation


   Configuration


   Plug-ins




 Hosted by
SourceForge.net Logo

/home/brennan/n-sim/OrbisQuartus/server/mini_mpi.c File Reference

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <mini_mpi.h>
#include "mini_mpi-internal.h"

Go to the source code of this file.

Functions

void string_to_tasks (int count, char *str, task_t *head)
int type_size (MPI_Datatype type)
int buffer_to_char (char *string, int len, void *buf, int count, MPI_Datatype type)
int char_to_buffer (void *buf, int count, MPI_Datatype type, char *string)
int MPI_Initialized (int *flag)
int MPI_Comm_size (MPI_Comm comm, int *size)
int MPI_Comm_rank (MPI_Comm comm, int *rank)

Variables

int my_numprocs = 0
int my_taskid = 0
unsigned short my_init = 0
sockaddr_in head_addr
int my_socket
task_ttask_array


Function Documentation

int buffer_to_char char *  string,
int  len,
void *  buf,
int  count,
MPI_Datatype  type
 

Definition at line 115 of file mini_mpi.c.

References MPI_BYTE, MPI_CHAR, and MPI_UNSIGNED_SHORT.

Referenced by MPI_Bcast(), MPI_Isend(), and MPI_Send().

int char_to_buffer void *  buf,
int  count,
MPI_Datatype  type,
char *  string
 

Todo:
implement char_to_buffer (convert string to MPI msg)

Definition at line 218 of file mini_mpi.c.

Referenced by MPI_Irecv(), and MPI_Recv().

int MPI_Comm_rank MPI_Comm  comm,
int *  rank
 

Definition at line 244 of file mini_mpi.c.

References MPI_COMM_WORLD, MPI_SUCCESS, my_init, and my_taskid.

int MPI_Comm_size MPI_Comm  comm,
int *  size
 

Definition at line 235 of file mini_mpi.c.

References MPI_COMM_WORLD, MPI_SUCCESS, my_init, and my_numprocs.

int MPI_Initialized int *  flag  ) 
 

Definition at line 228 of file mini_mpi.c.

References MPI_SUCCESS, and my_init.

void string_to_tasks int  count,
char *  str,
task_t head
 

Todo:
FIXME incompatable with L4, just store char[16]?

Definition at line 52 of file mini_mpi.c.

Referenced by MPI_Init().

int type_size MPI_Datatype  type  ) 
 

Definition at line 72 of file mini_mpi.c.

References MPI_BYTE, MPI_CHAR, MPI_DOUBLE, MPI_FLOAT, MPI_INT, MPI_LONG, MPI_LONG_DOUBLE, MPI_PACKED, MPI_SHORT, MPI_UNSIGNED_INT, MPI_UNSIGNED_LONG, and MPI_UNSIGNED_SHORT.

Referenced by MPI_Bcast(), MPI_Isend(), and MPI_Send().


Variable Documentation

struct sockaddr_in head_addr
 

Definition at line 47 of file mini_mpi.c.

unsigned short my_init = 0
 

Definition at line 46 of file mini_mpi.c.

int my_numprocs = 0
 

Definition at line 44 of file mini_mpi.c.

int my_socket
 

Definition at line 48 of file mini_mpi.c.

int my_taskid = 0
 

Definition at line 45 of file mini_mpi.c.

task_t* task_array
 

Definition at line 49 of file mini_mpi.c.


© 2007, Los Alamos National Security, LLC.