-
Notifications
You must be signed in to change notification settings - Fork 858
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mpif08: add remaining datatype constructors
needing bigcount variants: create_hindexed create_hindexed_block create_hvector create_indexed_block fix a problem in the fortran data type py code. add a AINT_COUNT in type for fortran too. Signed-off-by: Howard Pritchard <howardp@lanl.gov>
- Loading branch information
Showing
12 changed files
with
189 additions
and
173 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
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
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
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
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,46 @@ | ||
/* | ||
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana | ||
* University Research and Technology | ||
* Corporation. All rights reserved. | ||
* 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, | ||
* University of Stuttgart. All rights reserved. | ||
* Copyright (c) 2004-2005 The Regents of the University of California. | ||
* All rights reserved. | ||
* Copyright (c) 2011-2014 Cisco Systems, Inc. All rights reserved. | ||
* Copyright (c) 2015 Research Organization for Information Science | ||
* and Technology (RIST). All rights reserved. | ||
* $COPYRIGHT$ | ||
* | ||
* Additional copyrights may follow | ||
* | ||
* $HEADER$ | ||
*/ | ||
|
||
PROTOTYPE VOID type_create_hindexed(COUNT count, | ||
COUNT_ARRAY array_of_blocklengths, | ||
AINT_COUNT_ARRAY array_of_displacements, | ||
DATATYPE oldtype, | ||
DATATYPE_OUT newtype) | ||
{ | ||
int c_ierr; | ||
MPI_Datatype c_old = PMPI_Type_f2c(*oldtype); | ||
MPI_Datatype c_new; | ||
OMPI_ARRAY_NAME_DECL(array_of_blocklengths); | ||
|
||
OMPI_ARRAY_FINT_2_INT(array_of_blocklengths, *count); | ||
|
||
c_ierr = @INNER_CALL@(OMPI_FINT_2_INT(*count), | ||
OMPI_ARRAY_NAME_CONVERT(array_of_blocklengths), | ||
array_of_displacements, c_old, | ||
&c_new); | ||
if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); | ||
|
||
if (MPI_SUCCESS == c_ierr) { | ||
*newtype = PMPI_Type_c2f(c_new); | ||
} | ||
|
||
OMPI_ARRAY_FINT_2_INT_CLEANUP(array_of_blocklengths); | ||
} |
33 changes: 33 additions & 0 deletions
33
ompi/mpi/fortran/use-mpi-f08/type_create_hindexed_block.c.in
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,33 @@ | ||
/* | ||
* Copyright (c) 2012 The University of Tennessee and The University | ||
* of Tennessee Research Foundation. All rights | ||
* reserved. | ||
* Copyright (c) 2012 Inria. All rights reserved. | ||
* Copyright (c) 2015 Research Organization for Information Science | ||
* and Technology (RIST). All rights reserved. | ||
* $COPYRIGHT$ | ||
* | ||
* Additional copyrights may follow | ||
* | ||
* $HEADER$ | ||
*/ | ||
|
||
|
||
PROTOTYPE VOID type_create_hindexed_block(COUNT count, COUNT blocklength, | ||
AINT_COUNT_ARRAY array_of_displacements, | ||
DATATYPE oldtype, DATATYPE_OUT newtype) | ||
{ | ||
int c_ierr; | ||
MPI_Datatype c_old = PMPI_Type_f2c(*oldtype); | ||
MPI_Datatype c_new; | ||
|
||
c_ierr = @INNER_CALL@(OMPI_FINT_2_INT(*count), | ||
OMPI_FINT_2_INT(*blocklength), | ||
array_of_displacements, | ||
c_old, &c_new); | ||
if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); | ||
|
||
if (MPI_SUCCESS == c_ierr) { | ||
*newtype = PMPI_Type_c2f(c_new); | ||
} | ||
} |
30 changes: 0 additions & 30 deletions
30
ompi/mpi/fortran/use-mpi-f08/type_create_hindexed_block_f08.F90
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,39 @@ | ||
/* | ||
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana | ||
* University Research and Technology | ||
* Corporation. All rights reserved. | ||
* 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, | ||
* University of Stuttgart. All rights reserved. | ||
* Copyright (c) 2004-2005 The Regents of the University of California. | ||
* All rights reserved. | ||
* Copyright (c) 2007-2012 Cisco Systems, Inc. All rights reserved. | ||
* Copyright (c) 2015 Research Organization for Information Science | ||
* and Technology (RIST). All rights reserved. | ||
* $COPYRIGHT$ | ||
* | ||
* Additional copyrights may follow | ||
* | ||
* $HEADER$ | ||
*/ | ||
|
||
PROTOTYPE VOID type_create_hvector(COUNT count, COUNT blocklength, | ||
AINT_COUNT stride, DATATYPE oldtype, | ||
DATATYPE_OUT newtype) | ||
{ | ||
int c_ierr; | ||
MPI_Datatype c_old = PMPI_Type_f2c(*oldtype); | ||
MPI_Datatype c_new; | ||
|
||
c_ierr = @INNER_CALL@(OMPI_FINT_2_INT(*count), | ||
OMPI_FINT_2_INT(*blocklength), | ||
*stride, | ||
c_old, &c_new); | ||
if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); | ||
|
||
if (MPI_SUCCESS == c_ierr) { | ||
*newtype = PMPI_Type_c2f(c_new); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
45 changes: 45 additions & 0 deletions
45
ompi/mpi/fortran/use-mpi-f08/type_create_indexed_block.c.in
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,45 @@ | ||
/* | ||
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana | ||
* University Research and Technology | ||
* Corporation. All rights reserved. | ||
* 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, | ||
* University of Stuttgart. All rights reserved. | ||
* Copyright (c) 2004-2005 The Regents of the University of California. | ||
* All rights reserved. | ||
* Copyright (c) 2011-2012 Cisco Systems, Inc. All rights reserved. | ||
* Copyright (c) 2015 Research Organization for Information Science | ||
* and Technology (RIST). All rights reserved. | ||
* $COPYRIGHT$ | ||
* | ||
* Additional copyrights may follow | ||
* | ||
* $HEADER$ | ||
*/ | ||
|
||
PROTOTYPE VOID type_create_indexed_block(COUNT count, COUNT blocklength, | ||
COUNT_ARRAY array_of_displacements, | ||
DATATYPE oldtype, DATATYPE_OUT newtype) | ||
{ | ||
int c_ierr; | ||
MPI_Datatype c_old = PMPI_Type_f2c(*oldtype); | ||
MPI_Datatype c_new; | ||
OMPI_ARRAY_NAME_DECL(array_of_displacements); | ||
|
||
OMPI_ARRAY_FINT_2_INT(array_of_displacements, *count); | ||
|
||
c_ierr = @INNER_CALL@(OMPI_FINT_2_INT(*count), | ||
OMPI_FINT_2_INT(*blocklength), | ||
OMPI_ARRAY_NAME_CONVERT(array_of_displacements), | ||
c_old, &c_new); | ||
if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); | ||
|
||
if (MPI_SUCCESS == c_ierr) { | ||
*newtype = PMPI_Type_c2f(c_new); | ||
} | ||
|
||
OMPI_ARRAY_FINT_2_INT_CLEANUP(array_of_displacements); | ||
} | ||
|
Oops, something went wrong.