[petsc-users] Problem in compiling PETSc+ML

Satish Balay balay at mcs.anl.gov
Thu Aug 16 17:02:38 CDT 2018


Here is one way to get --download-ml working. [its a bit hakey]

1. update ml.py to run configure with additional options: "--disable-libcheck FLIBS=Ws2_32.lib"

diff --git a/config/BuildSystem/config/packages/ml.py b/config/BuildSystem/config/packages/ml.py
index 2987cf2122..e921db0ef5 100644
--- a/config/BuildSystem/config/packages/ml.py
+++ b/config/BuildSystem/config/packages/ml.py
@@ -35,7 +35,7 @@ class Configure(config.package.GNUPackage):
     args.append('--disable-ml-aztecoo')
     args.append('--disable-ml-examples')
     args.append('--disable-tests')
-    args.append('--enable-libcheck')
+    args.append('--disable-libcheck')
 
     self.framework.pushLanguage('C')
     args.append('--with-cflags="'+self.removeWarningFlags(self.framework.getCompilerFlags())+' -DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX '+ self.headers.toStringNoDupes(self.mpi.include)+'"')
@@ -45,6 +45,7 @@ class Configure(config.package.GNUPackage):
     if hasattr(self.compilers, 'FC'):
       self.framework.pushLanguage('FC')
       args.append('--with-fflags="'+self.framework.getCompilerFlags()+' '+ self.headers.toStringNoDupes(self.mpi.include)+'"')
+      args.append('FLIBS=Ws2_32.lib')
       self.framework.popLanguage()
     else:
       args.append('F77=""')

2. run configure with option CPPFLAGS=-DICL [this works arround some include file issues inside ML]

Here ML gets successfully built  - but its built as libml.a - not libml.lib

3. copy PETSC_ARCH/lib/libml.a to PETSC_ARCH/lib/libml.lib

4. rerun previous configure command [don't forget CPPFLAGS=-DICL option]

Satish

On Thu, 16 Aug 2018, Satish Balay wrote:

> If you can built it from Trilinos - you should be able to use it from PETSc.
> [by specifing ml to petsc with --with-ml-include,--with-ml-lib options]
> 
> This is unverified though..
> 
> Satish
> 
> 
> On Thu, 16 Aug 2018, Ali Reza Khaz'ali wrote:
> 
> > Thanks a lot. In fact I had built ML from Trilinos before, and I wondered if I
> > could use it in PETSc.
> > 
> > Best wishes,
> > 
> > Ali
> > 
> > 
> > On 8/16/2018 10:12 PM, Satish Balay wrote:
> > > Sorry - most external packages won't work with --download-pacakge
> > > option on windows [with MS/Intel compilers].
> > >
> > > If you need ML on windows - you might have to install it separately
> > > [by checking its windows installation instructions - if they exist]
> > >
> > > And then specify it to petsc configure with --with-ml-include
> > > --with-ml-lib options.
> > >
> > > Satish
> > >
> > > On Thu, 16 Aug 2018, Ali Reza Khaz'ali wrote:
> > >
> > >> Hi,
> > >>
> > >> I have been using PETSc on a MS windows 7 x64 system with Intel MKL, MPI
> > >> and
> > >> compilers without problem. For an specific problem, I had to use ML.
> > >> However,
> > >> I could not compile ML with the before-mentioned toolsets.  The the log
> > >> files
> > >> (PETSc and ML) are attached. Any help is much appreciated.
> > >>
> > >>
> > >> Thanks,
> > >>
> > >> Ali
> > >>
> > >>
> > 
> > 
> 


More information about the petsc-users mailing list