Commits

Satish Balay committed b1bda85

spai: update spai to using -DSPAI_USE_MPI [instead of -DMPI]
This fixes clang compile error with -DMPI & mpi.h [from MPICH]

  • Participants
  • Parent commits 2122902

Comments (0)

Files changed (2)

File config/PETSc/packages/spai.py

 class Configure(PETSc.package.NewPackage):
   def __init__(self, framework):
     PETSc.package.NewPackage.__init__(self, framework)
-    self.download  = ['http://ftp.mcs.anl.gov/pub/petsc/externalpackages/spai_3.0-mar-06.tar.gz']
+    self.download  = ['http://ftp.mcs.anl.gov/pub/petsc/externalpackages/spai-3.0-p1.tar.gz']
     self.functions = ['bspai']
     self.includes  = ['spai.h']
     self.liblist   = [['libspai.a']]
     elif self.blasLapack.mangling == 'caps': FTNOPT = ''
     else:                                          FTNOPT = '-DSP2'
 
-    args = 'CC = '+self.framework.getCompiler()+'\nCFLAGS = -DMPI '+FTNOPT+' '+self.framework.getCompilerFlags()+' '+self.headers.toString(self.mpi.include)+'\n'
+    args = 'CC = '+self.framework.getCompiler()+'\nCFLAGS = -DSPAI_USE_MPI '+FTNOPT+' '+self.framework.getCompilerFlags()+' '+self.headers.toString(self.mpi.include)+'\n'
     args = args+'AR         = '+self.setCompilers.AR+'\n'
     args = args+'ARFLAGS    = '+self.setCompilers.AR_FLAGS+'\n'
 

File src/ksp/pc/impls/spai/ispai.c

     These are the SPAI include files
 */
 EXTERN_C_BEGIN
-#define MPI /* required for setting SPAI_Comm correctly in basics.h */
+#define SPAI_USE_MPI /* required for setting SPAI_Comm correctly in basics.h */
 #include <spai.h>
 #include <matrix.h>
 EXTERN_C_END