From b0b21c68b41410bb3fc6784a5a92a6a1c41bd3c8 Mon Sep 17 00:00:00 2001 From: Gleb Natapov Date: Sun, 9 Mar 2008 13:17:13 +0000 Subject: [PATCH] Remove trailing spaces from SM BTL. This commit was SVN r17794. --- ompi/mca/btl/sm/btl_sm.c | 48 +++++++++++++++--------------- ompi/mca/btl/sm/btl_sm.h | 24 +++++++-------- ompi/mca/btl/sm/btl_sm_component.c | 28 ++++++++--------- ompi/mca/btl/sm/btl_sm_endpoint.h | 10 +++---- ompi/mca/btl/sm/btl_sm_fifo.h | 2 +- ompi/mca/btl/sm/btl_sm_frag.c | 6 ++-- ompi/mca/btl/sm/btl_sm_frag.h | 6 ++-- 7 files changed, 62 insertions(+), 62 deletions(-) diff --git a/ompi/mca/btl/sm/btl_sm.c b/ompi/mca/btl/sm/btl_sm.c index 882c965832..64d9f868a3 100644 --- a/ompi/mca/btl/sm/btl_sm.c +++ b/ompi/mca/btl/sm/btl_sm.c @@ -5,15 +5,15 @@ * Copyright (c) 2004-2008 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2007 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2007 High Performance Computing Center Stuttgart, * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2006-2007 Voltaire. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ @@ -104,7 +104,7 @@ mca_btl_sm_t mca_btl_sm = { mca_btl_sm_free, mca_btl_sm_prepare_src, NULL, - mca_btl_sm_send, + mca_btl_sm_send, NULL, /* put */ NULL, /* get */ mca_btl_base_dump, @@ -129,9 +129,9 @@ mca_btl_sm_module_resource_t mca_btl_sm_module_resource; #define OFFSET2ADDR(OFFSET, BASE) ((ptrdiff_t)(OFFSET) + (char*)(BASE)) int mca_btl_sm_add_procs( - struct mca_btl_base_module_t* btl, - size_t nprocs, - struct ompi_proc_t **procs, + struct mca_btl_base_module_t* btl, + size_t nprocs, + struct ompi_proc_t **procs, struct mca_btl_base_endpoint_t **peers, ompi_bitmap_t* reachability) { @@ -205,7 +205,7 @@ int mca_btl_sm_add_procs( OBJ_CONSTRUCT(&peer->pending_sends, opal_list_t); #if OMPI_ENABLE_PROGRESS_THREADS == 1 - sprintf(path, "%s"OPAL_PATH_SEP"sm_fifo.%lu", orte_process_info.job_session_dir, + sprintf(path, "%s"OPAL_PATH_SEP"sm_fifo.%lu", orte_process_info.job_session_dir, (unsigned long)procs[proc]->proc_name.vpid); peer->fifo_fd = open(path, O_WRONLY); if(peer->fifo_fd < 0) { @@ -295,8 +295,8 @@ int mca_btl_sm_add_procs( /* Allocate Shared Memory BTL process coordination * data structure. This will reside in shared memory */ - /* - * Create backing file - only first time through + /* + * Create backing file - only first time through */ if ( !mca_btl_sm.btl_inited ) { /* set file name */ @@ -312,7 +312,7 @@ int mca_btl_sm_add_procs( size = sizeof(mca_btl_sm_module_resource_t); if(NULL==(mca_btl_sm_component.mmap_file=mca_common_sm_mmap_init(size, mca_btl_sm_component.sm_resource_ctl_file, - sizeof(mca_btl_sm_module_resource_t), 0))) + sizeof(mca_btl_sm_module_resource_t), 0))) { opal_output(0, "mca_btl_sm_add_procs: unable to create shared memory BTL coordinating strucure :: size %lu \n", (unsigned long)size); @@ -330,7 +330,7 @@ int mca_btl_sm_add_procs( * make this array growable, but then one would need to uses mutexes * for any access to these queues to ensure data consistancy when * the array is grown */ - + if(0 == mca_btl_sm_component.my_smp_rank ) { /* allocate ompi_fifo_t strucutes for each fifo of the queue * pairs - one per pair of local processes */ @@ -412,18 +412,18 @@ int mca_btl_sm_add_procs( * flags are set */ opal_atomic_mb(); } - + /* Note: Need to make sure that proc 0 initializes control * structures before any of the other procs can progress */ - if( 0 != mca_btl_sm_component.my_smp_rank ) + if( 0 != mca_btl_sm_component.my_smp_rank ) { /* spin unitl local proc 0 initializes the segment */ while(!mca_btl_sm_component.mmap_file->map_seg->seg_inited) { opal_atomic_rmb(); - opal_progress(); + opal_progress(); } } - + /* set the base of the shared memory segment, and flag * indicating that it is set */ tmp_ptr=(volatile char **) @@ -647,9 +647,9 @@ CLEANUP: } int mca_btl_sm_del_procs( - struct mca_btl_base_module_t* btl, + struct mca_btl_base_module_t* btl, size_t nprocs, - struct ompi_proc_t **procs, + struct ompi_proc_t **procs, struct mca_btl_base_endpoint_t **peers) { return OMPI_SUCCESS; @@ -675,7 +675,7 @@ int mca_btl_sm_finalize(struct mca_btl_base_module_t* btl) } -/* +/* * Register callback function for error handling.. */ int mca_btl_sm_register_error_cb( @@ -730,7 +730,7 @@ extern int mca_btl_sm_free( { mca_btl_sm_frag_t* frag = (mca_btl_sm_frag_t*)des; MCA_BTL_SM_FRAG_RETURN(frag); - + return OMPI_SUCCESS; } @@ -763,7 +763,7 @@ struct mca_btl_base_descriptor_t* mca_btl_sm_prepare_src( if(reserve + max_data > frag->size) { max_data = frag->size - reserve; - } + } iov.iov_len = max_data; iov.iov_base = (IOVBASE_TYPE*)(((unsigned char*)(frag->segment.seg_addr.pval)) + @@ -780,7 +780,7 @@ struct mca_btl_base_descriptor_t* mca_btl_sm_prepare_src( return &frag->base; } - + /** * Initiate a send to the peer. * @@ -804,9 +804,9 @@ int mca_btl_sm_send( frag->endpoint = endpoint; - /* + /* * post the descriptor in the queue - post with the relative - * address + * address */ MCA_BTL_SM_FIFO_WRITE(endpoint, endpoint->my_smp_rank, endpoint->peer_smp_rank, frag->hdr, false, rc); diff --git a/ompi/mca/btl/sm/btl_sm.h b/ompi/mca/btl/sm/btl_sm.h index 67ea48f623..be93738419 100644 --- a/ompi/mca/btl/sm/btl_sm.h +++ b/ompi/mca/btl/sm/btl_sm.h @@ -6,15 +6,15 @@ * Copyright (c) 2004-2006 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2006-2007 Voltaire. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ /** @@ -43,7 +43,7 @@ #include "opal/event/event.h" #include "ompi/mca/pml/pml.h" #include "ompi/mca/btl/btl.h" -#include "ompi/mca/btl/base/base.h" +#include "ompi/mca/btl/base/base.h" #include "ompi/mca/mpool/mpool.h" #include "ompi/mca/common/sm/common_sm_mmap.h" @@ -91,7 +91,7 @@ struct mca_btl_sm_component_t { size_t eager_limit; /**< first fragment size */ size_t max_frag_size; /**< maximum (second and beyone) fragment size */ opal_mutex_t sm_lock; - char* sm_resource_ctl_file; /**< name of shared memory file used + char* sm_resource_ctl_file; /**< name of shared memory file used to coordinate resource usage */ mca_common_sm_mmap_t *mmap_file; /**< description of mmap'ed file */ mca_btl_sm_module_resource_t *sm_ctl_header; /* control header in @@ -153,14 +153,14 @@ extern int mca_btl_sm_component_close(void); /** * SM module initialization. - * + * * @param num_btls (OUT) Number of BTLs returned in BTL array. * @param enable_progress_threads (IN) Flag indicating whether BTL is allowed to have progress threads * @param enable_mpi_threads (IN) Flag indicating whether BTL must support multilple simultaneous invocations from different threads * */ extern mca_btl_base_module_t** mca_btl_sm_component_init( - int *num_btls, + int *num_btls, bool enable_progress_threads, bool enable_mpi_threads ); @@ -196,7 +196,7 @@ int mca_btl_sm_register_error_cb( /** * Cleanup any resources held by the BTL. - * + * * @param btl BTL instance. * @return OMPI_SUCCESS or error status on failure. */ @@ -212,12 +212,12 @@ extern int mca_btl_sm_finalize( * Called for message that is send from process with the virtual * address of the shared memory segment being different than that of * the receiver. - * + * * @param btl (IN) - * @param proc (IN) + * @param proc (IN) * @param peer (OUT) * @return OMPI_SUCCESS or error status on failure. - * + * */ extern int mca_btl_sm_add_procs( @@ -314,7 +314,7 @@ int mca_btl_sm_ft_event(int state); void mca_btl_sm_component_event_thread(opal_object_t*); #endif -#if OMPI_ENABLE_PROGRESS_THREADS == 1 +#if OMPI_ENABLE_PROGRESS_THREADS == 1 #define MCA_BTL_SM_SIGNAL_PEER(peer) \ { \ unsigned char cmd = DATA; \ diff --git a/ompi/mca/btl/sm/btl_sm_component.c b/ompi/mca/btl/sm/btl_sm_component.c index 5c38a1c27a..679f02b931 100644 --- a/ompi/mca/btl/sm/btl_sm_component.c +++ b/ompi/mca/btl/sm/btl_sm_component.c @@ -5,15 +5,15 @@ * Copyright (c) 2004-2008 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2006-2007 Voltaire. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" @@ -60,7 +60,7 @@ /* - * Shared Memory (SM) component instance. + * Shared Memory (SM) component instance. */ mca_btl_sm_component_t mca_btl_sm_component = { @@ -85,7 +85,7 @@ mca_btl_sm_component_t mca_btl_sm_component = { MCA_BASE_METADATA_PARAM_NONE }, - mca_btl_sm_component_init, + mca_btl_sm_component_init, mca_btl_sm_component_progress, } /* end super */ }; @@ -96,7 +96,7 @@ mca_btl_sm_component_t mca_btl_sm_component = { */ static inline char* mca_btl_sm_param_register_string( - const char* param_name, + const char* param_name, const char* default_value) { char *param_value; @@ -104,9 +104,9 @@ static inline char* mca_btl_sm_param_register_string( mca_base_param_lookup_string(id, ¶m_value); return param_value; } - + static inline int mca_btl_sm_param_register_int( - const char* param_name, + const char* param_name, int default_value) { int id = mca_base_param_register_int("btl","sm",param_name,NULL,default_value); @@ -171,7 +171,7 @@ int mca_btl_sm_component_open(void) mca_btl_sm.super.btl_bandwidth = 900; mca_btl_sm.super.btl_latency = 100; - mca_btl_base_param_register(&mca_btl_sm_component.super.btl_version, + mca_btl_base_param_register(&mca_btl_sm_component.super.btl_version, &mca_btl_sm.super); mca_btl_sm_component.max_frag_size = mca_btl_sm.super.btl_max_send_size; mca_btl_sm_component.eager_limit = mca_btl_sm.super.btl_eager_limit; @@ -213,7 +213,7 @@ int mca_btl_sm_component_close(void) errno); goto CLEANUP; } - + /* unlink file, so that it will be deleted when all references * to it are gone - no error checking, since we want all procs * to call this, so that in an abnormal termination scenario, @@ -227,7 +227,7 @@ int mca_btl_sm_component_close(void) if(mca_btl_sm_component.sm_fifo_fd > 0) { /* write a done message down the pipe */ unsigned char cmd = DONE; - if( write(mca_btl_sm_component.sm_fifo_fd,&cmd,sizeof(cmd)) != + if( write(mca_btl_sm_component.sm_fifo_fd,&cmd,sizeof(cmd)) != sizeof(cmd)){ opal_output(0, "mca_btl_sm_component_close: write fifo failed: errno=%d\n", errno); @@ -249,7 +249,7 @@ CLEANUP: * SM component initialization */ mca_btl_base_module_t** mca_btl_sm_component_init( - int *num_btls, + int *num_btls, bool enable_progress_threads, bool enable_mpi_threads) { @@ -263,7 +263,7 @@ mca_btl_base_module_t** mca_btl_sm_component_init( #if OMPI_ENABLE_PROGRESS_THREADS == 1 /* create a named pipe to receive events */ - sprintf( mca_btl_sm_component.sm_fifo_path, + sprintf( mca_btl_sm_component.sm_fifo_path, "%s"OPAL_PATH_SEP"sm_fifo.%lu", orte_process_info.job_session_dir, (unsigned long)ORTE_PROC_MY_NAME->vpid ); if(mkfifo(mca_btl_sm_component.sm_fifo_path, 0660) < 0) { @@ -320,7 +320,7 @@ void mca_btl_sm_component_event_thread(opal_object_t* thread) if( DONE == cmd ){ /* return when done message received */ return; - } + } mca_btl_sm_component_progress(); } } diff --git a/ompi/mca/btl/sm/btl_sm_endpoint.h b/ompi/mca/btl/sm/btl_sm_endpoint.h index e4407a12bc..a053fa2bcd 100644 --- a/ompi/mca/btl/sm/btl_sm_endpoint.h +++ b/ompi/mca/btl/sm/btl_sm_endpoint.h @@ -5,15 +5,15 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2006-2007 Voltaire. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ /** @@ -28,7 +28,7 @@ /** * An abstraction that represents a connection to a endpoint process. - * An instance of mca_ptl_base_endpoint_t is associated w/ each process + * An instance of mca_ptl_base_endpoint_t is associated w/ each process * and BTL pair at startup. */ @@ -43,6 +43,6 @@ struct mca_btl_base_endpoint_t { opal_list_t pending_sends; /**< pending data to send */ }; -void +void btl_sm_add_pending(struct mca_btl_base_endpoint_t *ep, void *data, bool resend); #endif diff --git a/ompi/mca/btl/sm/btl_sm_fifo.h b/ompi/mca/btl/sm/btl_sm_fifo.h index 9727272926..975c913606 100644 --- a/ompi/mca/btl/sm/btl_sm_fifo.h +++ b/ompi/mca/btl/sm/btl_sm_fifo.h @@ -24,6 +24,6 @@ do { \ } \ if(opal_using_threads()) \ opal_atomic_unlock(fifo->head_lock); \ -} while(0) +} while(0) #endif diff --git a/ompi/mca/btl/sm/btl_sm_frag.c b/ompi/mca/btl/sm/btl_sm_frag.c index f26fe309cf..21ec6a526f 100644 --- a/ompi/mca/btl/sm/btl_sm_frag.c +++ b/ompi/mca/btl/sm/btl_sm_frag.c @@ -5,14 +5,14 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ #include "ompi_config.h" diff --git a/ompi/mca/btl/sm/btl_sm_frag.h b/ompi/mca/btl/sm/btl_sm_frag.h index ef6f71ab97..7820fc0a83 100644 --- a/ompi/mca/btl/sm/btl_sm_frag.h +++ b/ompi/mca/btl/sm/btl_sm_frag.h @@ -5,15 +5,15 @@ * Copyright (c) 2004-2006 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2008 Sun Microsystems, Inc. All rights reserved. * $COPYRIGHT$ - * + * * Additional copyrights may follow - * + * * $HEADER$ */ /**