From: pini Date: Thu, 25 Mar 2010 14:41:54 +0000 (+0000) Subject: Removed trailing whitespace X-Git-Tag: SVN~361 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/0c8f6e25b5f4c2d43e89c600b99d63b4362f71ac Removed trailing whitespace git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@7379 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/src/smpi/smpi_base.c b/src/smpi/smpi_base.c index a85dcd5be4..7296b10763 100644 --- a/src/smpi/smpi_base.c +++ b/src/smpi/smpi_base.c @@ -106,7 +106,7 @@ static void finish_wait(MPI_Request* request, MPI_Status* status) { status->MPI_TAG = (*request)->tag; status->MPI_ERROR = MPI_SUCCESS; status->_count = (*request)->size; // size in bytes - status->_cancelled = 0; // FIXME: cancellation of requests not handled yet + status->_cancelled = 0; // FIXME: cancellation of requests not handled yet } DEBUG3("finishing wait for %p [data = %p, complete = %d]", *request, data, data->complete); // data == *request if sender is first to finish its wait @@ -459,7 +459,7 @@ void smpi_mpi_reduce(void* sendbuf, void* recvbuf, int count, MPI_Datatype datat int rank, size, src, index, datasize; MPI_Request* requests; void** tmpbufs; - + rank = smpi_comm_rank(comm); size = smpi_comm_size(comm); if(rank != root) { @@ -468,7 +468,7 @@ void smpi_mpi_reduce(void* sendbuf, void* recvbuf, int count, MPI_Datatype datat } else { datasize = smpi_datatype_size(datatype); // Local copy from root - memcpy(recvbuf, sendbuf, count * datasize * sizeof(char)); + memcpy(recvbuf, sendbuf, count * datasize * sizeof(char)); // Receive buffers from senders //TODO: make a MPI_barrier here ? requests = xbt_new(MPI_Request, size - 1); @@ -508,12 +508,12 @@ FIXME: buggy implementation int rank, size, other, index, datasize; MPI_Request* requests; void** tmpbufs; - + rank = smpi_comm_rank(comm); size = smpi_comm_size(comm); datasize = smpi_datatype_size(datatype); // Local copy from self - memcpy(recvbuf, sendbuf, count * datasize * sizeof(char)); + memcpy(recvbuf, sendbuf, count * datasize * sizeof(char)); // Send/Recv buffers to/from others; //TODO: make a MPI_barrier here ? requests = xbt_new(MPI_Request, 2 * (size - 1)); @@ -552,12 +552,12 @@ void smpi_mpi_scan(void* sendbuf, void* recvbuf, int count, MPI_Datatype datatyp int total; MPI_Request* requests; void** tmpbufs; - + rank = smpi_comm_rank(comm); size = smpi_comm_size(comm); datasize = smpi_datatype_size(datatype); // Local copy from self - memcpy(recvbuf, sendbuf, count * datasize * sizeof(char)); + memcpy(recvbuf, sendbuf, count * datasize * sizeof(char)); // Send/Recv buffers to/from others; total = rank + (size - (rank + 1)); requests = xbt_new(MPI_Request, total); diff --git a/src/smpi/smpi_coll.c b/src/smpi/smpi_coll.c index a5d1232719..6dcc1ddc00 100644 --- a/src/smpi/smpi_coll.c +++ b/src/smpi/smpi_coll.c @@ -38,7 +38,7 @@ static proc_tree_t alloc_tree(int arity) { tree = xbt_new(struct s_proc_tree, 1); tree->PROCTREE_A = arity; - tree->isRoot = 0; + tree->isRoot = 0; tree->numChildren = 0; tree->child = xbt_new(int, arity); for(i = 0; i < arity; i++) { @@ -144,13 +144,13 @@ static void tree_antibcast(void* buf, int count, MPI_Datatype datatype, int root } smpi_mpi_waitall(tree->numChildren, requests, MPI_STATUS_IGNORE); xbt_free(requests); -} +} /** - * bcast with a binary, ternary, or whatever tree .. + * bcast with a binary, ternary, or whatever tree .. **/ void nary_tree_bcast(void* buf, int count, MPI_Datatype datatype, int root, MPI_Comm comm, int arity) { - proc_tree_t tree = alloc_tree(arity); + proc_tree_t tree = alloc_tree(arity); int rank, size; rank = smpi_comm_rank(comm); @@ -161,10 +161,10 @@ void nary_tree_bcast(void* buf, int count, MPI_Datatype datatype, int root, MPI_ } /** - * barrier with a binary, ternary, or whatever tree .. + * barrier with a binary, ternary, or whatever tree .. **/ void nary_tree_barrier(MPI_Comm comm, int arity) { - proc_tree_t tree = alloc_tree( arity ); + proc_tree_t tree = alloc_tree( arity ); int rank, size; char dummy='$'; @@ -177,7 +177,7 @@ void nary_tree_barrier(MPI_Comm comm, int arity) { } /** - * Alltoall Bruck + * Alltoall Bruck * * Openmpi calls this routine when the message size sent to each rank < 2000 bytes and size < 12 **/ @@ -259,7 +259,7 @@ int smpi_coll_tuned_alltoall_basic_linear(void *sendbuf, int sendcount, MPI_Data requests[count] = smpi_mpi_irecv(&((char*)recvbuf)[i * recvinc], recvcount, recvtype, i, system_tag, comm); count++; } - /* Now post all sends in reverse order + /* Now post all sends in reverse order * - We would like to minimize the search time through message queue * when messages actually arrive in the order in which they were posted. * TODO: check the previous assertion @@ -287,9 +287,9 @@ int smpi_coll_tuned_alltoall_basic_linear(void *sendbuf, int sendcount, MPI_Data * * this algorithm performs size steps (1<=s<=size) and * at each step s, a process p sends iand receive to.from a unique distinct remote process - * size=5 : s=1: 4->0->1, 0->1->2, 1->2->3, ... + * size=5 : s=1: 4->0->1, 0->1->2, 1->2->3, ... * s=2: 3->0->2, 4->1->3, 0->2->4, 1->3->0 , 2->4->1 - * .... + * .... * Openmpi calls this routine when the message size sent to each rank is greater than 3000 bytes **/ int smpi_coll_tuned_alltoall_pairwise(void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int recvcount, MPI_Datatype recvtype, MPI_Comm comm) { diff --git a/src/smpi/smpi_coll_private.h b/src/smpi/smpi_coll_private.h index f062c7c684..13b1a5d824 100644 --- a/src/smpi/smpi_coll_private.h +++ b/src/smpi/smpi_coll_private.h @@ -1,5 +1,5 @@ /** - * $Id$tag + * $Id$tag * * smpi_coll_private.h -- functions of smpi_coll.c that are exported to other SMPI modules. * diff --git a/src/smpi/smpi_global.c b/src/smpi/smpi_global.c index 2eaabc458a..f71b5279bc 100644 --- a/src/smpi/smpi_global.c +++ b/src/smpi/smpi_global.c @@ -186,7 +186,7 @@ int main(int argc, char **argv) SIMIX_init(); while (SIMIX_solve(NULL, NULL) != -1.0); - + if (xbt_cfg_get_int(_surf_cfg_set, "display_timing")) INFO1("simulation time %g", SIMIX_get_clock()); diff --git a/src/smpi/smpi_mpi.c b/src/smpi/smpi_mpi.c index aab96e300c..ca9595358b 100644 --- a/src/smpi/smpi_mpi.c +++ b/src/smpi/smpi_mpi.c @@ -778,10 +778,10 @@ int MPI_Sendrecv_replace(void* buf, int count, MPI_Datatype datatype, int dst, i int MPI_Get_count(MPI_Status *status, MPI_Datatype datatype, int *count) { int retval; /* - * Returns the number of entries received. (Again, we count entries, each of type datatype, not bytes.) + * Returns the number of entries received. (Again, we count entries, each of type datatype, not bytes.) * The datatype argument should match the argument provided by the receive call that set the status variable. - * If the size of the datatype is zero, this routine will return a count of zero. - * If the amount of data in status is not an exact multiple of the size of datatype + * If the size of the datatype is zero, this routine will return a count of zero. + * If the amount of data in status is not an exact multiple of the size of datatype * (so that count would not be integral), a count of MPI_UNDEFINED is returned instead. * */ @@ -1148,7 +1148,7 @@ int MPI_Alltoallv(void* sendbuf, int* sendcounts, int* senddisps, MPI_Datatype s } else if(sendcounts == NULL || senddisps == NULL || recvcounts == NULL || recvdisps == NULL) { retval = MPI_ERR_ARG; } else { - retval = smpi_coll_basic_alltoallv(sendbuf, sendcounts, senddisps, sendtype, recvbuf, recvcounts, recvdisps, recvtype, comm); + retval = smpi_coll_basic_alltoallv(sendbuf, sendcounts, senddisps, sendtype, recvbuf, recvcounts, recvdisps, recvtype, comm); } smpi_bench_begin(rank, "Alltoallv"); return retval; diff --git a/src/smpi/smpi_mpi_dt.c b/src/smpi/smpi_mpi_dt.c index a3728f0c29..f2453c03bc 100644 --- a/src/smpi/smpi_mpi_dt.c +++ b/src/smpi/smpi_mpi_dt.c @@ -1,7 +1,7 @@ /* $Id$tag */ /* smpi_mpi_dt.c -- MPI primitives to handle datatypes */ - + /* Note: a very incomplete implementation */ /* Copyright (c) 2009 Stephane Genaud. */ @@ -40,11 +40,11 @@ typedef struct s_smpi_mpi_datatype { //The following are datatypes for the MPI functions MPI_MAXLOC and MPI_MINLOC. typedef struct { float value; int index;} float_int; -typedef struct { long value; int index;} long_int ; +typedef struct { long value; int index;} long_int ; typedef struct { double value; int index;} double_int; typedef struct { short value; int index;} short_int; typedef struct { int value; int index;} int_int; -typedef struct { long double value; int index;} long_double_int; +typedef struct { long double value; int index;} long_double_int; // Predefined data types CREATE_MPI_DATATYPE(MPI_CHAR, char); @@ -122,8 +122,8 @@ int smpi_datatype_copy(void* sendbuf, int sendcount, MPI_Datatype sendtype, void memcpy(recvbuf, sendbuf, smpi_datatype_size(sendtype) * count); retval = sendcount > recvcount ? MPI_ERR_TRUNCATE : MPI_SUCCESS; } else { - /* FIXME: cases - * - If receive packed. + /* FIXME: cases + * - If receive packed. * - If send packed * to be treated once we have the MPI_Pack things ... **/ @@ -181,7 +181,7 @@ static void max_func(void* a, void* b, int* length, MPI_Datatype* datatype) { APPLY_FUNC(a, b, length, long double, MAX_OP); } } - + static void min_func(void* a, void* b, int* length, MPI_Datatype* datatype) { if(*datatype == MPI_SHORT) { APPLY_FUNC(a, b, length, short, MIN_OP); @@ -203,7 +203,7 @@ static void min_func(void* a, void* b, int* length, MPI_Datatype* datatype) { APPLY_FUNC(a, b, length, long double, MIN_OP); } } - + static void sum_func(void* a, void* b, int* length, MPI_Datatype* datatype) { if(*datatype == MPI_SHORT) { APPLY_FUNC(a, b, length, short, SUM_OP); @@ -231,7 +231,7 @@ static void sum_func(void* a, void* b, int* length, MPI_Datatype* datatype) { APPLY_FUNC(a, b, length, long double _Complex, SUM_OP); } } - + static void prod_func(void* a, void* b, int* length, MPI_Datatype* datatype) { if(*datatype == MPI_SHORT) { APPLY_FUNC(a, b, length, short, PROD_OP); @@ -259,7 +259,7 @@ static void prod_func(void* a, void* b, int* length, MPI_Datatype* datatype) { APPLY_FUNC(a, b, length, long double _Complex, PROD_OP); } } - + static void land_func(void* a, void* b, int* length, MPI_Datatype* datatype) { if(*datatype == MPI_SHORT) { APPLY_FUNC(a, b, length, short, LAND_OP); @@ -277,7 +277,7 @@ static void land_func(void* a, void* b, int* length, MPI_Datatype* datatype) { APPLY_FUNC(a, b, length, _Bool, LAND_OP); } } - + static void lor_func(void* a, void* b, int* length, MPI_Datatype* datatype) { if(*datatype == MPI_SHORT) { APPLY_FUNC(a, b, length, short, LOR_OP); @@ -295,7 +295,7 @@ static void lor_func(void* a, void* b, int* length, MPI_Datatype* datatype) { APPLY_FUNC(a, b, length, _Bool, LOR_OP); } } - + static void lxor_func(void* a, void* b, int* length, MPI_Datatype* datatype) { if(*datatype == MPI_SHORT) { APPLY_FUNC(a, b, length, short, LXOR_OP); @@ -313,7 +313,7 @@ static void lxor_func(void* a, void* b, int* length, MPI_Datatype* datatype) { APPLY_FUNC(a, b, length, _Bool, LXOR_OP); } } - + static void band_func(void* a, void* b, int* length, MPI_Datatype* datatype) { if(*datatype == MPI_SHORT) { APPLY_FUNC(a, b, length, short, BAND_OP); @@ -331,7 +331,7 @@ static void band_func(void* a, void* b, int* length, MPI_Datatype* datatype) { APPLY_FUNC(a, b, length, uint8_t, BAND_OP); } } - + static void bor_func(void* a, void* b, int* length, MPI_Datatype* datatype) { if(*datatype == MPI_SHORT) { APPLY_FUNC(a, b, length, short, BOR_OP); @@ -349,7 +349,7 @@ static void bor_func(void* a, void* b, int* length, MPI_Datatype* datatype) { APPLY_FUNC(a, b, length, uint8_t, BOR_OP); } } - + static void bxor_func(void* a, void* b, int* length, MPI_Datatype* datatype) { if(*datatype == MPI_SHORT) { APPLY_FUNC(a, b, length, short, BXOR_OP); diff --git a/src/smpi/smpi_mpi_dt_private.h b/src/smpi/smpi_mpi_dt_private.h index cb548a9993..21df279eac 100644 --- a/src/smpi/smpi_mpi_dt_private.h +++ b/src/smpi/smpi_mpi_dt_private.h @@ -1,5 +1,5 @@ /** - * $Id: $tag + * $Id: $tag * * smpi_mpi_dt_private.h -- functions of smpi_mpi_dt.c that are exported to other SMPI modules. * @@ -19,7 +19,7 @@ #define DT_FLAG_UNAVAILABLE 0x0400 /**< datatypes unavailable on the build (OS or compiler dependant) */ #define DT_FLAG_VECTOR 0x0800 /**< valid only for loops. The loop contain only one element **< without extent. It correspond to the vector type. */ -/* +/* * We should make the difference here between the predefined contiguous and non contiguous * datatypes. The DT_FLAG_BASIC is held by all predefined contiguous datatypes. */ diff --git a/src/smpi/smpirun.in b/src/smpi/smpirun.in index 49ea4e1bb3..b2699d909c 100755 --- a/src/smpi/smpirun.in +++ b/src/smpi/smpirun.in @@ -43,7 +43,7 @@ while true; do fi shift 2 ;; - + "-map") MAPOPT="true" shift 1 @@ -54,7 +54,7 @@ while true; do shift 1 ;; - "-help" | "--help" | "-h") + "-help" | "--help" | "-h") echo "usage:" echo "$0 [-quiet] [-keep-temps] [-np ] -platform -hostfile [-map] program [program-options]" echo "or (deprecated usage):" @@ -62,12 +62,12 @@ while true; do echo exit ;; - + "--cfg="*|"--log="*) for OPT in ${1#*=} do SIMOPTS="$SIMOPTS ${1%%=*}=$OPT" - done + done shift 1 ;; *) @@ -85,7 +85,7 @@ shift ##-------------------------------- DEFAULT or SPECIFIED PLATFORM -------------------------------------- -if [ -z "${PLATFORM}" ]; then +if [ -z "${PLATFORM}" ]; then PLATFORMTMP="$(mktemp tmpXXXXXX)" cat > ${PLATFORMTMP} < tags------------------------------ -for i in ${SEQ} +for i in ${SEQ} do if [ -n "${HOSTFILE}" ]; then j=$(( $i % ${NUMHOSTS} )) - fi + fi ##---- optional display of ranks to process mapping if [ -n "${MAPOPT}" ]; then - echo "[rank $i] -> ${hostnames[$j]}" + echo "[rank $i] -> ${hostnames[$j]}" fi if [ -z "${hostnames[$j]}" ]; then @@ -193,7 +193,7 @@ ${EXEC} ${SIMOPTS} ${PLATFORMTMP} ${APPLICATIONTMP} if [ -z "${KEEP}" ] ; then if [ -z "${PLATFORM}" ]; then - rm ${PLATFORMTMP} + rm ${PLATFORMTMP} fi rm ${APPLICATIONTMP} fi