diff options
author | schnetter <> | 2004-03-01 18:43:00 +0000 |
---|---|---|
committer | schnetter <> | 2004-03-01 18:43:00 +0000 |
commit | 97df8c98805b426b9d574fa61120b04eecf728ab (patch) | |
tree | e340f4ff9f65f0f79163161fb86d7d029eebb28e /Carpet/CarpetLib/src/dist.cc | |
parent | bfc49628edeb767a55b1479f9c6760780aa9fdf2 (diff) |
Create MPI data types for Cactus types instead of C++ types.
darcs-hash:20040301184351-07bb3-d13ed7d3ba26f2cddfcec8404bb7dd4e88489a2d.gz
Diffstat (limited to 'Carpet/CarpetLib/src/dist.cc')
-rw-r--r-- | Carpet/CarpetLib/src/dist.cc | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/Carpet/CarpetLib/src/dist.cc b/Carpet/CarpetLib/src/dist.cc index 89c17935a..9626f9fd0 100644 --- a/Carpet/CarpetLib/src/dist.cc +++ b/Carpet/CarpetLib/src/dist.cc @@ -1,4 +1,4 @@ -// $Header: /home/eschnett/C/carpet/Carpet/Carpet/CarpetLib/src/dist.cc,v 1.6 2003/01/03 15:49:36 schnetter Exp $ +// $Header: /home/eschnett/C/carpet/Carpet/Carpet/CarpetLib/src/dist.cc,v 1.7 2004/03/01 19:43:51 schnetter Exp $ #include <assert.h> @@ -19,9 +19,15 @@ namespace dist { MPI_Comm comm; +#if 0 MPI_Datatype mpi_complex_float; MPI_Datatype mpi_complex_double; MPI_Datatype mpi_complex_long_double; +#else + MPI_Datatype mpi_complex8; + MPI_Datatype mpi_complex16; + MPI_Datatype mpi_complex32; +#endif void init (int& argc, char**& argv) { MPI_Init (&argc, &argv); @@ -31,12 +37,30 @@ namespace dist { void pseudoinit () { comm = MPI_COMM_WORLD; +#if 0 MPI_Type_contiguous (2, MPI_FLOAT, &mpi_complex_float); MPI_Type_commit (&mpi_complex_float); MPI_Type_contiguous (2, MPI_DOUBLE, &mpi_complex_double); MPI_Type_commit (&mpi_complex_double); MPI_Type_contiguous (2, MPI_LONG_DOUBLE, &mpi_complex_long_double); MPI_Type_commit (&mpi_complex_long_double); +#else +# ifdef CCTK_REAL4 + CCTK_REAL4 dummy4; + MPI_Type_contiguous (2, datatype(dummy4), &mpi_complex8); + MPI_Type_commit (&mpi_complex8); +# endif +# ifdef CCTK_REAL8 + CCTK_REAL8 dummy8; + MPI_Type_contiguous (2, datatype(dummy8), &mpi_complex16); + MPI_Type_commit (&mpi_complex16); +# endif +# ifdef CCTK_REAL16 + CCTK_REAL16 dummy16; + MPI_Type_contiguous (2, datatype(dummy16), &mpi_complex32); + MPI_Type_commit (&mpi_complex32); +# endif +#endif } void finalize () { |