[petsc-users] --download-fblaslapack libraries cannot be used

Satish Balay balay at mcs.anl.gov
Thu Mar 12 14:50:00 CDT 2020


Does the attached patch make a difference?

Satish

On Thu, 12 Mar 2020, Satish Balay via petsc-users wrote:

> For some reason - the fortran compiler libraries check worked fine without -lgfortran.
> 
> But now - flbaslapack check is failing without it.
> 
> To work arround - you can use option LIBS=-lgfortran
> 
> Satish
> 
> On Thu, 12 Mar 2020, Fande Kong wrote:
> 
> > Hi All,
> > 
> > I had an issue when configuring petsc on a linux machine. I have the
> > following error message:
> > 
> >      Compiling FBLASLAPACK; this may take several minutes
> > 
> > ===============================================================================
> > 
> >    TESTING: checkLib from
> > config.packages.BlasLapack(config/BuildSystem/config/packages/BlasLapack.py:120)
> > 
> >  *******************************************************************************
> >          UNABLE to CONFIGURE with GIVEN OPTIONS    (see configure.log for
> > details):
> > -------------------------------------------------------------------------------
> > --download-fblaslapack libraries cannot be used
> > *******************************************************************************
> > 
> > 
> > The configuration log was attached.
> > 
> > Thanks,
> > 
> > Fande,
> > 
> 
-------------- next part --------------
diff --git a/config/BuildSystem/config/compilers.py b/config/BuildSystem/config/compilers.py
index 8a854db1ca..8df2c754ee 100644
--- a/config/BuildSystem/config/compilers.py
+++ b/config/BuildSystem/config/compilers.py
@@ -912,9 +912,9 @@ Otherwise you need a different combination of C, C++, and Fortran compilers")
     cbody = "int main(int argc,char **args)\n{return 0;}\n";
     self.pushLanguage('FC')
     if self.checkLink(includes='#include <mpif.h>',body='      call MPI_Allreduce()\n'):
-      fbody = "subroutine asub()\n      print*,'testing'\n      call MPI_Allreduce()\n      return\n      end\n"
+      fbody = "subroutine asub()\n      integer,parameter :: idx=5\n      write(6,100) idx\n 100  format('value:', i5)\n      call MPI_Allreduce()\n      return\n      end\n"
     else:
-      fbody = "subroutine asub()\n      print*,'testing'\n      return\n      end\n"
+      fbody = "subroutine asub()\n      integer,parameter :: idx=5\n      write(6,100) idx\n 100  format('value:', i5)\n      return\n      end\n"
     self.popLanguage()
     try:
       if self.checkCrossLink(fbody,cbody,language1='FC',language2='C'):


More information about the petsc-users mailing list