aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschnetter <schnetter@2e825fa2-fb71-486d-8b7f-a5ff3f0f6cb8>2002-11-03 15:20:13 +0000
committerschnetter <schnetter@2e825fa2-fb71-486d-8b7f-a5ff3f0f6cb8>2002-11-03 15:20:13 +0000
commit5a0eefdbf5807d4bf95b3dc2bfb3e0f0e7abcfe3 (patch)
treef6fe6feba8b7c78cd4a11da2dcc5915fef4a2d1f
parentfaa526b62885a9e9f6ecad7c928cb4c89df39f66 (diff)
Added capabilities to compile in Carpet and PUGH at the same time.
git-svn-id: http://svn.cactuscode.org/arrangements/CactusNumerical/Slab/trunk@8 2e825fa2-fb71-486d-8b7f-a5ff3f0f6cb8
-rw-r--r--src/slab.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/src/slab.c b/src/slab.c
index 27f6258..53bcabf 100644
--- a/src/slab.c
+++ b/src/slab.c
@@ -60,9 +60,11 @@ CCTK_FILEVERSION(TAT_Slab_slab_c);
#ifdef CCTK_MPI
# if defined CARPET_CARPET
# include "Carpet/Carpet/src/carpet_public.h"
-# elif defined CACTUSPUGH_PUGH
+# endif
+# if defined CACTUSPUGH_PUGH
# include "CactusPUGH/PUGH/src/include/pugh.h"
-# else
+# endif
+# if ! defined CARPET_CARPET && ! defined CACTUSPUGH_PUGH
# error "No supported driver thorn included"
# endif
#endif
@@ -160,12 +162,16 @@ static MPI_Comm get_mpi_comm (cGH * restrict const cctkGH)
{
#ifdef CCTK_MPI
# if defined CARPET_CARPET
- return CarpetMPIComm ();
-# elif defined CACTUSPUGH_PUGH
- return PUGH_pGH(cctkGH)->PUGH_COMM_WORLD;
-# else
-# error "No supported driver thorn included"
+ if (CCTK_IsThornActive ("Carpet")) {
+ return CarpetMPIComm ();
+ }
+# endif
+# if defined CACTUSPUGH_PUGH
+ if (CCTK_IsThornActive ("PUGH")) {
+ return PUGH_pGH(cctkGH)->PUGH_COMM_WORLD;
+ }
# endif
+ assert (0);
#else
return 0;
#endif