Cleaning warnings in collectives code. Refs trac:3243.
This commit was SVN r27089. The following Trac tickets were found above: Ticket 3243 --> https://svn.open-mpi.org/trac/ompi/ticket/3243
Этот коммит содержится в:
родитель
8e2efb4084
Коммит
6fac989588
@ -74,8 +74,8 @@ int coll_ml_progress_individual_message(mca_coll_ml_fragment_t *frag_descriptor)
|
|||||||
|
|
||||||
/* looks like we are done */
|
/* looks like we are done */
|
||||||
/* increment counter for number of completed fragments */
|
/* increment counter for number of completed fragments */
|
||||||
n_frags_complete=OPAL_THREAD_ADD64(
|
n_frags_complete = OPAL_THREAD_ADD_SIZE_T(
|
||||||
&(frag_descriptor->full_msg_descriptor->frags_complete),1);
|
&(frag_descriptor->full_msg_descriptor->frags_complete), 1);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* release resrouces
|
* release resrouces
|
||||||
|
@ -23,28 +23,6 @@
|
|||||||
#include "orte/util/proc_info.h"
|
#include "orte/util/proc_info.h"
|
||||||
#include "ompi/mca/pml/pml.h"
|
#include "ompi/mca/pml/pml.h"
|
||||||
|
|
||||||
static void send_completion(int status, struct orte_process_name_t* peer, struct iovec* msg,
|
|
||||||
int count, orte_rml_tag_t tag, void* cbdata)
|
|
||||||
{
|
|
||||||
/* set send completion flag */
|
|
||||||
*(int *)cbdata=1;
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void recv_completion(int status, struct orte_process_name_t* peer, struct iovec* msg,
|
|
||||||
int count, orte_rml_tag_t tag, void* cbdata)
|
|
||||||
{
|
|
||||||
/* set receive completion flag */
|
|
||||||
MB();
|
|
||||||
*(int *)cbdata=1;
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* All-reduce - subgroup in communicator
|
* All-reduce - subgroup in communicator
|
||||||
*/
|
*/
|
||||||
|
@ -24,114 +24,6 @@
|
|||||||
#include "orte/util/proc_info.h"
|
#include "orte/util/proc_info.h"
|
||||||
#include "ompi/mca/pml/pml.h"
|
#include "ompi/mca/pml/pml.h"
|
||||||
|
|
||||||
static void send_completion(int status, struct orte_process_name_t* peer, struct iovec* msg,
|
|
||||||
int count, orte_rml_tag_t tag, void* cbdata)
|
|
||||||
{
|
|
||||||
/* set send completion flag */
|
|
||||||
*(int *)cbdata=1;
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void recv_completion(int status, struct orte_process_name_t* peer, struct iovec* msg,
|
|
||||||
int count, orte_rml_tag_t tag, void* cbdata)
|
|
||||||
{
|
|
||||||
/* set receive completion flag */
|
|
||||||
MB();
|
|
||||||
*(int *)cbdata=1;
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static int op_reduce(int op_type,void *src_dest_buf,void * src_buf, int count,
|
|
||||||
int data_type)
|
|
||||||
{
|
|
||||||
/* local variables */
|
|
||||||
int ret;
|
|
||||||
|
|
||||||
/* op type */
|
|
||||||
switch (op_type) {
|
|
||||||
|
|
||||||
case OP_SUM:
|
|
||||||
|
|
||||||
switch (data_type) {
|
|
||||||
case TYPE_INT4:
|
|
||||||
{
|
|
||||||
int *int_src_ptr=(int *)src_buf;
|
|
||||||
int *int_src_dst_ptr=(int *)src_dest_buf;
|
|
||||||
int cnt;
|
|
||||||
for(cnt=0 ; cnt < count ; cnt++) {
|
|
||||||
int_src_dst_ptr[cnt]+=int_src_ptr[cnt];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
ret=OMPI_ERROR;
|
|
||||||
goto Error;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
|
|
||||||
case OP_MAX:
|
|
||||||
switch (data_type) {
|
|
||||||
case TYPE_INT4:
|
|
||||||
{
|
|
||||||
int *int_src_ptr=(int *)src_buf;
|
|
||||||
int *int_src_dst_ptr=(int *)src_dest_buf;
|
|
||||||
int cnt;
|
|
||||||
for(cnt=0 ; cnt < count ; cnt++) {
|
|
||||||
if (int_src_dst_ptr[cnt] < int_src_ptr[cnt]) {
|
|
||||||
int_src_dst_ptr[cnt] = int_src_ptr[cnt];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
ret=OMPI_ERROR;
|
|
||||||
goto Error;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
|
|
||||||
case OP_MIN:
|
|
||||||
switch (data_type) {
|
|
||||||
case TYPE_INT4:
|
|
||||||
{
|
|
||||||
int *int_src_ptr=(int *)src_buf;
|
|
||||||
int *int_src_dst_ptr=(int *)src_dest_buf;
|
|
||||||
int cnt;
|
|
||||||
for(cnt=0 ; cnt < count ; cnt++) {
|
|
||||||
if (int_src_dst_ptr[cnt] > int_src_ptr[cnt]) {
|
|
||||||
int_src_dst_ptr[cnt] = int_src_ptr[cnt];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
ret=OMPI_ERROR;
|
|
||||||
goto Error;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
ret=OMPI_ERROR;
|
|
||||||
goto Error;
|
|
||||||
|
|
||||||
}
|
|
||||||
Error:
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* All-reduce for contigous primitive types
|
* All-reduce for contigous primitive types
|
||||||
*/
|
*/
|
||||||
|
@ -19,16 +19,6 @@ BEGIN_C_DECLS
|
|||||||
|
|
||||||
#define MAX_TMP_BUFFER 8192
|
#define MAX_TMP_BUFFER 8192
|
||||||
|
|
||||||
static void send_completion(int status, struct orte_process_name_t* peer,
|
|
||||||
struct iovec* msg, int count, orte_rml_tag_t tag, void* cbdata);
|
|
||||||
|
|
||||||
static void recv_completion(int status, struct orte_process_name_t* peer,
|
|
||||||
struct iovec* msg, int count, orte_rml_tag_t tag, void* cbdata);
|
|
||||||
|
|
||||||
static int op_reduce(int op_type,void *src_dest_buf,void * src_buf, int count,
|
|
||||||
int data_type);
|
|
||||||
|
|
||||||
|
|
||||||
END_C_DECLS
|
END_C_DECLS
|
||||||
|
|
||||||
#endif /* COMM_NETPATTERNS_H */
|
#endif /* COMM_NETPATTERNS_H */
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user