aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschnetter <schnetter@2e825fa2-fb71-486d-8b7f-a5ff3f0f6cb8>2006-06-14 17:18:47 +0000
committerschnetter <schnetter@2e825fa2-fb71-486d-8b7f-a5ff3f0f6cb8>2006-06-14 17:18:47 +0000
commit396c1c94784ed539a40987d93d5add71a6fd7f71 (patch)
tree425da2a6c4500ae66f59bc2f19dd447749e1e4b0
parent4ed14add9266568d462c6292ac23a6ce462fc69c (diff)
Correct prototypes of scheduled routines.
git-svn-id: http://svn.cactuscode.org/arrangements/CactusNumerical/Slab/trunk@48 2e825fa2-fb71-486d-8b7f-a5ff3f0f6cb8
-rw-r--r--src/slab.c38
1 files changed, 21 insertions, 17 deletions
diff --git a/src/slab.c b/src/slab.c
index 7f367fa..8fc089f 100644
--- a/src/slab.c
+++ b/src/slab.c
@@ -76,20 +76,22 @@ static int timer_copy_in;
static int timer_xfer;
static int timer_copy_back;
-void Slab_InitTimers (void)
+int Slab_InitTimers (void)
{
timer_init = CCTK_TimerCreate ("Slab/init");
timer_copy_in = CCTK_TimerCreate ("Slab/copy in");
timer_xfer = CCTK_TimerCreate ("Slab/xfer");
timer_copy_back = CCTK_TimerCreate ("Slab/copy back");
+ return 0;
}
-void Slab_PrintTimers (void)
+int Slab_PrintTimers (void)
{
CCTK_TimerPrintDataI (timer_init , -1);
CCTK_TimerPrintDataI (timer_copy_in , -1);
CCTK_TimerPrintDataI (timer_xfer , -1);
CCTK_TimerPrintDataI (timer_copy_back, -1);
+ return 0;
}
@@ -329,19 +331,19 @@ get_mpi_comm (const cGH * restrict const cctkGH)
/* Initialise the MPI datatypes for complex variables */
-void
+int
Slab_InitMPIDatatypes (void)
{
#ifdef CCTK_MPI
-# ifdef CCTK_REAL4
+# ifdef HAVE_CCTK_REAL4
MPI_Type_contiguous (2, CACTUS_MPI_REAL4, &CACTUS_MPI_COMPLEX8);
MPI_Type_commit (&CACTUS_MPI_COMPLEX8);
# endif
-# ifdef CCTK_REAL8
+# ifdef HAVE_CCTK_REAL8
MPI_Type_contiguous (2, CACTUS_MPI_REAL8, &CACTUS_MPI_COMPLEX16);
MPI_Type_commit (&CACTUS_MPI_COMPLEX16);
# endif
-# ifdef CCTK_REAL16
+# ifdef HAVE_CCTK_REAL16
MPI_Type_contiguous (2, CACTUS_MPI_REAL16, &CACTUS_MPI_COMPLEX32);
MPI_Type_commit (&CACTUS_MPI_COMPLEX32);
# endif
@@ -349,21 +351,23 @@ Slab_InitMPIDatatypes (void)
#ifndef CCTK_MPI
switch (sizeof(int)) {
-#ifdef CCTK_INT1
+#ifdef HAVE_CCTK_INT1
case sizeof(CCTK_INT1): MPI_INT = CCTK_VARIABLE_INT1; break;
#endif
-#ifdef CCTK_INT2
+#ifdef HAVE_CCTK_INT2
case sizeof(CCTK_INT2): MPI_INT = CCTK_VARIABLE_INT2; break;
#endif
-#ifdef CCTK_INT4
+#ifdef HAVE_CCTK_INT4
case sizeof(CCTK_INT4): MPI_INT = CCTK_VARIABLE_INT4; break;
#endif
-#ifdef CCTK_INT8
+#ifdef HAVE_CCTK_INT8
case sizeof(CCTK_INT8): MPI_INT = CCTK_VARIABLE_INT8; break;
#endif
default: assert(0);
}
#endif
+
+ return 0;
}
@@ -421,27 +425,27 @@ static MPI_Datatype mpi_type (int const cactustype)
int const normaltype = normal_type (cactustype);
switch (normaltype) {
case CCTK_VARIABLE_BYTE: return CACTUS_MPI_BYTE;
-#ifdef CCTK_INT1
+#ifdef HAVE_CCTK_INT1
case CCTK_VARIABLE_INT1: return CACTUS_MPI_INT1;
#endif
-#ifdef CCTK_INT2
+#ifdef HAVE_CCTK_INT2
case CCTK_VARIABLE_INT2: return CACTUS_MPI_INT2;
#endif
-#ifdef CCTK_INT4
+#ifdef HAVE_CCTK_INT4
case CCTK_VARIABLE_INT4: return CACTUS_MPI_INT4;
#endif
-#ifdef CCTK_INT8
+#ifdef HAVE_CCTK_INT8
case CCTK_VARIABLE_INT8: return CACTUS_MPI_INT8;
#endif
-#ifdef CCTK_REAL4
+#ifdef HAVE_CCTK_REAL4
case CCTK_VARIABLE_REAL4: return CACTUS_MPI_REAL4;
case CCTK_VARIABLE_COMPLEX8: return CACTUS_MPI_COMPLEX8;
#endif
-#ifdef CCTK_REAL8
+#ifdef HAVE_CCTK_REAL8
case CCTK_VARIABLE_REAL8: return CACTUS_MPI_REAL8;
case CCTK_VARIABLE_COMPLEX16: return CACTUS_MPI_COMPLEX16;
#endif
-#ifdef CCTK_REAL16
+#ifdef HAVE_CCTK_REAL16
case CCTK_VARIABLE_REAL16: return CACTUS_MPI_REAL16;
case CCTK_VARIABLE_COMPLEX32: return CACTUS_MPI_COMPLEX32;
#endif