diff options
author | schnetter <schnetter@2e825fa2-fb71-486d-8b7f-a5ff3f0f6cb8> | 2002-11-03 15:20:13 +0000 |
---|---|---|
committer | schnetter <schnetter@2e825fa2-fb71-486d-8b7f-a5ff3f0f6cb8> | 2002-11-03 15:20:13 +0000 |
commit | 5a0eefdbf5807d4bf95b3dc2bfb3e0f0e7abcfe3 (patch) | |
tree | f6fe6feba8b7c78cd4a11da2dcc5915fef4a2d1f | |
parent | faa526b62885a9e9f6ecad7c928cb4c89df39f66 (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.c | 20 |
1 files changed, 13 insertions, 7 deletions
@@ -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 |