Commits

Satish Balay committed 2eb7408

build: store mpi4py build log in PETSC_ARCH/conf/mpi4py.log.
This prevents listing of errors from mpi4py configure step in make.log
[so avoids flagging build as broken just because of configure errors].
Similarly fix petsc4py build.

  • Participants
  • Parent commits 5de2b04

Comments (0)

Files changed (2)

config/PETSc/packages/mpi4py.py

     archflags = ""
     if self.setCompilers.isDarwin():
       if self.types.sizes['known-sizeof-void-p'] == 32:
-        archflags = "ARCHFLAGS=\'-arch i386\'"
+        archflags = "ARCHFLAGS=\'-arch i386\' "
       else:
-        archflags = "ARCHFLAGS=\'-arch x86_64\'"
+        archflags = "ARCHFLAGS=\'-arch x86_64\' "
     self.addMakeRule('mpi4py','', \
-                       ['@MPICC=${PCC}; export MPICC; cd '+self.packageDir+';python setup.py clean --all; '+archflags+' python setup.py install --install-lib='+os.path.join(self.installDir,'lib'),\
+                       ['@echo "*** Building mpi4py ***"',\
+                          '@(MPICC=${PCC} && export MPICC && cd '+self.packageDir+' && \\\n\
+           python setup.py clean --all && \\\n\
+           '+archflags+'python setup.py install --install-lib='+os.path.join(self.installDir,'lib')+') > ${PETSC_ARCH}/conf/petsc4py.log 2>&1 || \\\n\
+             (echo "**************************ERROR*************************************" && \\\n\
+             echo "Error building mpi4py. Check ${PETSC_ARCH}/conf/petsc4py.log" && \\\n\
+             echo "********************************************************************" && \\\n\
+             exit 1)',\
                           '@echo "====================================="',\
                           '@echo "To use mpi4py, add '+os.path.join(self.petscconfigure.installdir,'lib')+' to PYTHONPATH"',\
                           '@echo "====================================="'])
 
   def alternateConfigureLibrary(self):
     self.addMakeRule('mpi4py','')
-    self.addMakeRule('mpi4py_noinstall','')

config/PETSc/packages/petsc4py.py

     archflags = ""
     if self.setCompilers.isDarwin():
       if self.types.sizes['known-sizeof-void-p'] == 32:
-        archflags = "ARCHFLAGS=\'-arch i386\'"
+        archflags = "ARCHFLAGS=\'-arch i386\' "
       else:
-        archflags = "ARCHFLAGS=\'-arch x86_64\'"
+        archflags = "ARCHFLAGS=\'-arch x86_64\' "
     self.addMakeRule('petsc4py','', \
-                       ['@cd '+self.packageDir+';python setup.py clean --all; '+archflags+' python setup.py install --install-lib='+os.path.join(self.installDir,'lib'),\
+                       ['@echo "*** Building petsc4py ***"',\
+                          '@(MPICC=${PCC} && export MPICC && cd '+self.packageDir+' && \\\n\
+           python setup.py clean --all && \\\n\
+           '+archflags+'python setup.py install --install-lib='+os.path.join(self.installDir,'lib')+') > ${PETSC_ARCH}/conf/petsc4py.log 2>&1 || \\\n\
+             (echo "**************************ERROR*************************************" && \\\n\
+             echo "Error building petsc4py. Check ${PETSC_ARCH}/conf/petsc4py.log" && \\\n\
+             echo "********************************************************************" && \\\n\
+             exit 1)',\
                           '@echo "====================================="',\
                           '@echo "To use petsc4py, add '+os.path.join(self.petscconfigure.installdir,'lib')+' to PYTHONPATH"',\
                           '@echo "====================================="'])