-
Notifications
You must be signed in to change notification settings - Fork 365
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
V2.0 !!! check in changes for MPI types and MPI_STATUS_IGNORE.
- Loading branch information
Ray Loy
committed
Nov 5, 2014
1 parent
900b2f8
commit 1823df3
Showing
39 changed files
with
13,074 additions
and
1,251 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
CC = @CC@ | ||
FC = @FC@ | ||
FCFLAGS = @FCFLAGS@ | ||
INCLUDE = -I. | ||
INCFLAG = @INCLUDEFLAG@ | ||
DEFS = @DEFS@ | ||
CFLAGS = @CFLAGS@ | ||
AR = @AR@ | ||
RANLIB = @RANLIB@ | ||
CRULE = .c.o | ||
F90RULE = .F90.o | ||
|
||
SHELL = /bin/sh | ||
|
||
MODULE = mpi-serial |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# generated automatically by aclocal 1.10 -*- Autoconf -*- | ||
|
||
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, | ||
# 2005, 2006 Free Software Foundation, Inc. | ||
# This file is free software; the Free Software Foundation | ||
# gives unlimited permission to copy and/or distribute it, | ||
# with or without modifications, as long as this notice is preserved. | ||
|
||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without | ||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A | ||
# PARTICULAR PURPOSE. | ||
|
||
|
||
m4_include([m4/ax_fc_version.m4]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,128 @@ | ||
#include "mpiP.h" | ||
|
||
/* | ||
* MPI_Cart_create | ||
* | ||
* create a new communicator, | ||
*/ | ||
|
||
|
||
FC_FUNC( mpi_cart_create , MPI_CART_CREATE ) | ||
( int *comm_old, int *ndims, int *dims, int *periods, | ||
int *reorder, int *comm_cart, int *ierr) | ||
{ | ||
*ierr = MPI_Cart_create( *comm_old, *ndims, dims, periods, *reorder, | ||
comm_cart); | ||
} | ||
|
||
|
||
int MPI_Cart_create( MPI_Comm comm_old, int ndims, int *dims, int *periods, | ||
int reorder, MPI_Comm *comm_cart) | ||
{ | ||
int i; | ||
for (i = 0; i < ndims; i++) | ||
if (dims[i] > 1) | ||
{ | ||
printf("MPI_Cart_create: Greater dimension than no. of procs\n"); | ||
abort(); | ||
} | ||
|
||
MPI_Comm_dup(comm_old, comm_cart); | ||
|
||
return MPI_SUCCESS; | ||
} | ||
|
||
|
||
/* | ||
* MPI_Cart_get | ||
* | ||
* Returns information about the cartesian organization | ||
* of the communicator. | ||
* | ||
* Assuming the user gives right maxdims, the only possible | ||
* dimensions are (1,1,..,1) for however many dimensions | ||
*/ | ||
|
||
|
||
FC_FUNC( mpi_cart_get , MPI_CART_GET ) | ||
(int * comm, int * maxdims, int * dims, | ||
int * periods, int * coords, int * ierr) | ||
{ | ||
*ierr = MPI_Cart_get(*comm, *maxdims, dims, periods, coords); | ||
} | ||
|
||
|
||
int MPI_Cart_get(MPI_Comm comm, int maxdims, int *dims, | ||
int *periods, int *coords) | ||
{ | ||
int i; | ||
for (i=0;i<maxdims;i++) | ||
{ | ||
dims[i]=1; | ||
coords[i]=0; | ||
} | ||
} | ||
|
||
|
||
|
||
/* | ||
* MPI_Cart_coords | ||
* | ||
* Returns the coordinates of a particular rank | ||
* If rank != 0, erroneous. Coordinates must be (0,0) | ||
*/ | ||
|
||
|
||
FC_FUNC( mpi_cart_coords , MPI_CART_COORDS) | ||
(int *comm, int *rank, int *maxdims, int *coords, int *ierr) | ||
{ | ||
*ierr = MPI_Cart_coords(*comm, *rank, *maxdims, coords); | ||
} | ||
|
||
|
||
int MPI_Cart_coords(MPI_Comm comm, int rank, int maxdims, int *coords) | ||
{ | ||
int i; | ||
|
||
if (rank != 0) | ||
{ | ||
printf("MPI_Cart_coords: Rank != 0\n"); | ||
abort(); | ||
} | ||
|
||
for (i=0;i<maxdims;i++) | ||
coords[i]=0; | ||
|
||
return MPI_SUCCESS; | ||
} | ||
|
||
|
||
/* | ||
* MPI_Dims_create | ||
* | ||
* A convenience function to distribute nodes among a grid. Since we have one | ||
* node only, every dimension must be "1" or it is erroneous | ||
*/ | ||
|
||
FC_FUNC( mpi_dims_create , MPI_DIMS_CREATE ) | ||
(int *nnodes, int *ndims, int * dims, int *ierr) | ||
{ | ||
*ierr = MPI_Dims_create(*nnodes, *ndims, dims); | ||
} | ||
|
||
|
||
int MPI_Dims_create(int nnodes, int ndims, int *dims) | ||
{ | ||
int i; | ||
|
||
if (nnodes > 1) | ||
{ | ||
printf("MPI_Dims_create: More nodes than procs specified.\n"); | ||
abort(); | ||
} | ||
|
||
for (i=0; i<ndims; i++) | ||
dims[i] = 1; | ||
|
||
return MPI_SUCCESS; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
/* config.h.in. Generated from configure.in by autoheader. */ | ||
|
||
/* User-set Fortran double size */ | ||
#undef CONFIG_FORT_DOUBLE | ||
|
||
/* User-set Fortran real size */ | ||
#undef CONFIG_FORT_REAL | ||
|
||
/* Define to dummy `main' function (if any) required to link to the Fortran | ||
libraries. */ | ||
#undef FC_DUMMY_MAIN | ||
|
||
/* Define if F77 and FC dummy `main' functions are identical. */ | ||
#undef FC_DUMMY_MAIN_EQ_F77 | ||
|
||
/* Define to a macro mangling the given C identifier (in lower and upper | ||
case), which must not contain underscores, for linking with Fortran. */ | ||
#undef FC_FUNC | ||
|
||
/* As FC_FUNC, but for C identifiers containing underscores. */ | ||
#undef FC_FUNC_ | ||
|
||
/* Define to 1 if you have the <inttypes.h> header file. */ | ||
#undef HAVE_INTTYPES_H | ||
|
||
/* Define to 1 if you have the <memory.h> header file. */ | ||
#undef HAVE_MEMORY_H | ||
|
||
/* Define to 1 if you have the <stdint.h> header file. */ | ||
#undef HAVE_STDINT_H | ||
|
||
/* Define to 1 if you have the <stdlib.h> header file. */ | ||
#undef HAVE_STDLIB_H | ||
|
||
/* Define to 1 if you have the <strings.h> header file. */ | ||
#undef HAVE_STRINGS_H | ||
|
||
/* Define to 1 if you have the <string.h> header file. */ | ||
#undef HAVE_STRING_H | ||
|
||
/* Define to 1 if you have the <sys/stat.h> header file. */ | ||
#undef HAVE_SYS_STAT_H | ||
|
||
/* Define to 1 if you have the <sys/types.h> header file. */ | ||
#undef HAVE_SYS_TYPES_H | ||
|
||
/* Define to 1 if you have the <unistd.h> header file. */ | ||
#undef HAVE_UNISTD_H | ||
|
||
/* Print extra debug info */ | ||
#undef INFO | ||
|
||
/* Name of package */ | ||
#undef PACKAGE | ||
|
||
/* Define to the address where bug reports for this package should be sent. */ | ||
#undef PACKAGE_BUGREPORT | ||
|
||
/* Define to the full name of this package. */ | ||
#undef PACKAGE_NAME | ||
|
||
/* Define to the full name and version of this package. */ | ||
#undef PACKAGE_STRING | ||
|
||
/* Define to the one symbol short name of this package. */ | ||
#undef PACKAGE_TARNAME | ||
|
||
/* Define to the version of this package. */ | ||
#undef PACKAGE_VERSION | ||
|
||
/* The size of `long', as computed by sizeof. */ | ||
#undef SIZEOF_LONG | ||
|
||
/* Define to 1 if you have the ANSI C header files. */ | ||
#undef STDC_HEADERS | ||
|
||
/* Perform tests on data copies internally instead of using MPI_Send */ | ||
#undef TEST_INTERNAL | ||
|
||
/* Perform type checking during communications */ | ||
#undef TYPE_CHECKING | ||
|
||
/* Version number of package */ | ||
#undef VERSION |
Oops, something went wrong.