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/xen/mini_mpi-xen.c File Reference

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <mini_mpi.h>
#include <mini_mpi-internal.h>

Go to the source code of this file.

Defines

#define MY_SOCK   (my_socket.fd)

Functions

int MPI_Init (int *argc, char ***argv)
int MPI_Comm_socket (MPI_Comm comm, int *sock)
int MPI_Abort (MPI_Comm comm, int errorcode)
int MPI_Finalize (void)
int MPI_Send (void *buf, int count, MPI_Datatype type, int dest, int tag, MPI_Comm comm)
int MPI_Recv (void *buf, int count, MPI_Datatype type, int source, int tag, MPI_Comm comm, MPI_Status *status)
int MPI_Isend (void *buf, int count, MPI_Datatype type, int dest, int tag, MPI_Comm comm, MPI_Request *request)
int MPI_Irecv (void *buf, int count, MPI_Datatype type, int source, int tag, MPI_Comm comm, MPI_Request *request)
int MPI_Wait (MPI_Request *request, MPI_Status *status)
int MPI_Waitall (int count, MPI_Request *request[], MPI_Status *status[])
int MPI_Barrier (MPI_Comm comm)
int MPI_Bcast (void *buffer, int count, MPI_Datatype datatype, int root, MPI_Comm comm)
int MPI_Scatter (void *sendbuffer, int sendcount, MPI_Datatype sendtype, void *recvbuffer, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm)
int MPI_Gather (void *sendbuffer, int sendcount, MPI_Datatype sendtype, void *recvbuffer, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm)

Variables

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


Define Documentation

#define MY_SOCK   (my_socket.fd)
 

Definition at line 57 of file mini_mpi-xen.c.

Referenced by MPI_Abort(), MPI_Barrier(), MPI_Comm_socket(), MPI_Finalize(), MPI_Init(), MPI_Isend(), and MPI_Send().


Function Documentation

int MPI_Abort MPI_Comm  comm,
int  errorcode
 

Definition at line 145 of file mini_mpi-xen.c.

References error, MINI_MPI_ABORT, MPI_COMM_WORLD, MPI_SUCCESS, my_init, MY_NC, and MY_SOCK.

int MPI_Barrier MPI_Comm  comm  ) 
 

Definition at line 261 of file mini_mpi-xen.c.

References error, MINI_MPI_BARRIER, MINI_MPI_RESUME, MPI_COMM_WORLD, MPI_SUCCESS, my_init, MY_NC, and MY_SOCK.

int MPI_Bcast void *  buffer,
int  count,
MPI_Datatype  datatype,
int  root,
MPI_Comm  comm
 

Definition at line 284 of file mini_mpi-xen.c.

References buffer_to_char(), error, MPI_COMM_WORLD, MPI_SUCCESS, my_init, type_size(), and vt_send().

int MPI_Comm_socket MPI_Comm  comm,
int *  sock
 

Definition at line 136 of file mini_mpi-xen.c.

References MPI_COMM_WORLD, MPI_SUCCESS, my_init, MY_SOCK, my_socket, and socket_ptr_t::nc.

int MPI_Finalize void   ) 
 

Definition at line 160 of file mini_mpi-xen.c.

References error, MINI_MPI_FINAL, MPI_SUCCESS, my_init, MY_NC, MY_SOCK, and task_array.

int MPI_Gather void *  sendbuffer,
int  sendcount,
MPI_Datatype  sendtype,
void *  recvbuffer,
int  recvcount,
MPI_Datatype  recvtype,
int  root,
MPI_Comm  comm
 

Todo:
implement scatter/gather

Definition at line 310 of file mini_mpi-xen.c.

References error, MINI_MPI_SEND, MPI_COMM_WORLD, MPI_SUCCESS, my_init, and MY_NC.

int MPI_Init int *  argc,
char ***  argv
 

Todo:
FIXME: complete setup

Definition at line 60 of file mini_mpi-xen.c.

References error, he, head_addr, MAX_MTU, memcpy, MINI_MPI_HEAD, MINI_MPI_INIT, MPI_INIT_PORT, MPI_PORT, MPI_SUCCESS, my_init, MY_NC, my_numprocs, MY_SOCK, my_socket, my_taskid, socket_ptr_t::nc, string_to_tasks(), task_array, and their_addr.

int MPI_Irecv void *  buf,
int  count,
MPI_Datatype  type,
int  source,
int  tag,
MPI_Comm  comm,
MPI_Request *  request
 

Todo:
is this MPI standard?
Todo:
nonblocking recv

Definition at line 235 of file mini_mpi-xen.c.

References char_to_buffer(), error, MINI_MPI_RECV, MPI_COMM_WORLD, MPI_MSG_LEN, MPI_SUCCESS, my_init, MY_NC, task_array, and vt_recv().

int MPI_Isend void *  buf,
int  count,
MPI_Datatype  type,
int  dest,
int  tag,
MPI_Comm  comm,
MPI_Request *  request
 

Todo:
nonblocking send MINI_MPI_SEND

Definition at line 213 of file mini_mpi-xen.c.

References buffer_to_char(), error, MINI_MPI_SEND, MPI_COMM_WORLD, MPI_SUCCESS, my_init, MY_NC, MY_SOCK, task_handle::sock, task_array, type_size(), and vt_send().

int MPI_Recv void *  buf,
int  count,
MPI_Datatype  type,
int  source,
int  tag,
MPI_Comm  comm,
MPI_Status *  status
 

Todo:
implement MPI recv functions

Definition at line 200 of file mini_mpi-xen.c.

References char_to_buffer(), error, MINI_MPI_RECV, MPI_COMM_WORLD, MPI_MSG_LEN, MPI_SUCCESS, my_init, MY_NC, task_array, and vt_recv().

int MPI_Scatter void *  sendbuffer,
int  sendcount,
MPI_Datatype  sendtype,
void *  recvbuffer,
int  recvcount,
MPI_Datatype  recvtype,
int  root,
MPI_Comm  comm
 

Todo:
implement scatter/gather

Definition at line 295 of file mini_mpi-xen.c.

References error, MINI_MPI_SCATTER, MPI_COMM_WORLD, MPI_SUCCESS, my_init, and MY_NC.

int MPI_Send void *  buf,
int  count,
MPI_Datatype  type,
int  dest,
int  tag,
MPI_Comm  comm
 

Definition at line 179 of file mini_mpi-xen.c.

References buffer_to_char(), error, MINI_MPI_SEND, MPI_COMM_WORLD, MPI_SUCCESS, my_init, MY_NC, MY_SOCK, task_handle::sock, task_array, type_size(), and vt_send().

int MPI_Wait MPI_Request *  request,
MPI_Status *  status
 

Todo:
implement wait on nonblocking send/recv

Definition at line 246 of file mini_mpi-xen.c.

References MPI_SUCCESS.

int MPI_Waitall int  count,
MPI_Request *  request[],
MPI_Status *  status[]
 

Definition at line 253 of file mini_mpi-xen.c.

References MPI_SUCCESS.


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.

socket_ptr_t 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.