Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated mpi-serial from MCSclimate/mpi-serial #1568

Merged
merged 1 commit into from
May 19, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions src/externals/mct/mpi-serial/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ SRCS_C = mpi.c \
list.c \
handles.c \
comm.c \
error.c \
ic_merge.c \
group.c \
time.c \
pack.c \
Expand Down Expand Up @@ -86,6 +88,3 @@ install: lib
$(INSTALL) lib$(MODULE).a -m 644 $(libdir)
$(INSTALL) mpi.h -m 644 $(includedir)
$(INSTALL) mpif.h -m 644 $(includedir)



42 changes: 40 additions & 2 deletions src/externals/mct/mpi-serial/README
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ List of MPI calls supported
mpi_abort
mpi_error_string
mpi_initialized
mpi_get_processor_name
mpi_get_library_version
mpi_wtime

comm and group ops
mpi_comm_free
Expand All @@ -74,29 +77,64 @@ List of MPI calls supported
mpi_comm_split
mpi_comm_group
mpi_group_incl
mpi_group_range_incl
mpi_group_union
mpi_group_intersection
mpi_group_difference
mpi_group_translate_ranks
mpi_group_free
mpi_cart_create
mpi_cart_coords
mpi_dims_create

send/receive ops
mpi_irecv
mpi_recv
mpi_test
mpi_testany
mpi_testall
mpi_testsome
mpi_wait
mpi_waitany
mpi_waitall
mpi_waitsome
mpi_isend
mpi_send
mpi_ssend
mpi_rsend
mpi_irsend
mpi_sendrecv
mpi_iprobe
mpi_probe
mpi_request_free

collective operations
mpi_barrier
mpi_bcast
mpi_gather
mpi_gatherv
mpi_allgather
mpi_scatter
mpi_scatterv
mpi_reduce
mpi_allreduce


mpi_reduce_scatter
mpi_scan
mpi_alltoall
mpi_alltoallv
mpi_alltoallw
mpi_op_create
mpi_op_free

data types and info objects
mpi_get_count
mpi_get_elements
mpi_pack
mpi_pack_size
mpi_unpack
mpi_info_create
mpi_info_set
mpi_info_free

-----
EOF
21 changes: 0 additions & 21 deletions src/externals/mct/mpi-serial/collective.c
Original file line number Diff line number Diff line change
Expand Up @@ -488,27 +488,6 @@ int MPI_Alltoallw(void *sendbuf, int *sendcounts,
}


/*********/


FC_FUNC( mpi_op_create , MPI_OP_CREATE )
( void *function, int *commute, int *op, int *ierror )
{
*ierror=MPI_Op_create(function,*commute,op);
}



int MPI_Op_create(MPI_User_function *function, int commute, MPI_Op *op)
{
*op=MPI_OP_NULL;

return(MPI_SUCCESS);

}




/*********/

Expand Down
13 changes: 13 additions & 0 deletions src/externals/mct/mpi-serial/error.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@

#include "mpiP.h"

/*
* Error handling code
* Just a stub for now to support the MPI interface without actually
* doing anything
*/

int MPI_Errhandler_set(MPI_Comm comm, MPI_Errhandler handle)
{
return(MPI_SUCCESS);
}
15 changes: 15 additions & 0 deletions src/externals/mct/mpi-serial/ic_merge.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@

#include "mpiP.h"

/*
* MPI_Intercomm_merge - Creates an intracommunicator from an intercommunicator
* This is just a stub for now to support mpi function calls even in Serial
* applications. In the case of a serial program, this function is a no-op and
* only ever returns MPI_SUCCESS
*/

int MPI_Intercomm_merge( MPI_Comm intercomm, int high, MPI_Comm *newintracomm )
{
newintracomm = (MPI_Comm *)intercomm;
return(MPI_SUCCESS);
}
19 changes: 16 additions & 3 deletions src/externals/mct/mpi-serial/mpi.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

#ifndef _MPI_H_
#define _MPI_H_

Expand Down Expand Up @@ -48,7 +47,6 @@ typedef int MPI_Group;
#define MPI_ERR_IN_STATUS (-1)
#define MPI_ERR_LASTCODE (-1)


/*
* MPI_UNDEFINED
*
Expand Down Expand Up @@ -191,6 +189,14 @@ typedef struct /* Fortran: INTEGER status(MPI_STATUS_SIZE) */
#define MPI_STATUSES_IGNORE ((MPI_Status *)0)


/*
* MPI Errhandling stubs (Not functional currently)
*/
typedef int MPI_Errhandler;

#define MPI_ERRORS_ARE_FATAL ((MPI_Errhandler)0)
#define MPI_ERRORS_RETURN ((MPI_Errhandler)-1)


/*
* Collective operations
Expand Down Expand Up @@ -246,7 +252,8 @@ typedef int MPI_Info; /* handle */
extern int MPI_Intercomm_create(MPI_Comm local_comm, int local_leader,
MPI_Comm peer_comm, int remote_leader,
int tag, MPI_Comm *newintercomm);

extern int MPI_Intercomm_merge(MPI_Comm intercomm, int high,
MPI_Comm *newintercomm);
extern int MPI_Cart_create(MPI_Comm comm_old, int ndims, int *dims,
int *periods, int reorder, MPI_Comm *comm_cart);
extern int MPI_Cart_get(MPI_Comm comm, int maxdims, int *dims,
Expand Down Expand Up @@ -389,6 +396,9 @@ extern int MPI_Iprobe(int source, int tag, MPI_Comm comm,

extern int MPI_Pack_size(int incount, MPI_Datatype type, MPI_Comm comm, MPI_Aint * size);

/* Error handling stub, not currently functional */
extern int MPI_Errhandler_set(MPI_Comm comm, MPI_Errhandler handle);

/* new type functions */
extern int MPI_Get_count(MPI_Status *status, MPI_Datatype datatype, int *count);
extern int MPI_Get_elements(MPI_Status *status, MPI_Datatype datatype, int *count);
Expand All @@ -400,6 +410,9 @@ extern int MPI_Type_vector(int count, int blocklen, int stride, MPI_Datatype old
extern int MPI_Type_hvector(int count, int blocklen, MPI_Aint stride,
MPI_Datatype oldtype, MPI_Datatype *newtype);

extern int MPI_Type_create_hvector(int count, int blocklen, MPI_Aint stride,
MPI_Datatype oldtype, MPI_Datatype *newtype);

extern int MPI_Type_indexed(int count, int *blocklens, int *displacements,
MPI_Datatype oldtype, MPI_Datatype *newtype);

Expand Down
Loading