version 1.4, 2003/02/14 22:29:16 |
version 1.5, 2003/03/07 03:12:28 |
|
|
* OF THE SOFTWARE HAS BEEN DEVELOPED BY A THIRD PARTY, THE THIRD PARTY |
* OF THE SOFTWARE HAS BEEN DEVELOPED BY A THIRD PARTY, THE THIRD PARTY |
* DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE, |
* DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE, |
* PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE. |
* PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE. |
* $OpenXM: OpenXM_contrib2/asir2000/io/ws_fileio.c,v 1.3 2000/08/22 05:04:18 noro Exp $ |
* $OpenXM: OpenXM_contrib2/asir2000/io/ws_fileio.c,v 1.4 2003/02/14 22:29:16 ohara Exp $ |
*/ |
*/ |
#if defined(VISUAL) || defined(MPI) |
#if defined(VISUAL) || MPI |
#include<stdio.h> |
#include<stdio.h> |
#include"wsio.h" |
#include"wsio.h" |
|
|
|
|
if (rst) { |
if (rst) { |
#if defined(VISUAL) |
#if defined(VISUAL) |
_fileno(&rst->fp) = -1; |
_fileno(&rst->fp) = -1; |
#elif defined(MPI) |
#elif MPI |
#if defined(sparc) |
#if defined(sparc) |
(&rst->fp)->_file = -1; |
(&rst->fp)->_file = -1; |
#else |
#else |
|
|
|
|
#if defined(VISUAL) |
#if defined(VISUAL) |
size = recv(s->fildes,data,count,0); |
size = recv(s->fildes,data,count,0); |
#elif defined(MPI) |
#elif MPI |
{ |
{ |
MPI_Status status; |
MPI_Status status; |
|
|
|
|
#if defined(VISUAL) |
#if defined(VISUAL) |
size = send(s->fildes,data,count,0); |
size = send(s->fildes,data,count,0); |
return size; |
return size; |
#elif defined(MPI) |
#elif MPI |
MPI_Ssend(&count,1,MPI_INT,s->fildes,0,MPI_COMM_WORLD); |
MPI_Ssend(&count,1,MPI_INT,s->fildes,0,MPI_COMM_WORLD); |
MPI_Ssend(data,count,MPI_CHAR,s->fildes,0,MPI_COMM_WORLD); |
MPI_Ssend(data,count,MPI_CHAR,s->fildes,0,MPI_COMM_WORLD); |
return count; |
return count; |
#endif |
#endif |
} |
} |
|
|
#if defined(MPI) |
#if MPI |
int mpi_nprocs,mpi_myid; |
int mpi_nprocs,mpi_myid; |
|
|
void mpi_init() |
void mpi_init() |