Compiling PETSc with Visual Studio 2008

Satish Balay balay at mcs.anl.gov
Mon Apr 28 22:13:02 CDT 2008


On Mon, 28 Apr 2008, Satish Balay wrote:

> 
> On Sun, 27 Apr 2008, Farshid Mossaiby wrote:

> > Configure says it cannot make ParMetis with the option
> > --download-parmetis. Is this related to Visual Studio 2008
> > compiler I use, or something else is wrong? Here is the message:
> 
> Most externalpackages are never tested by their original authors with
> MS compilers. And we have not tried porting them to them.
> 
> So most of them won't compile - hence --download-packagename might not
> work.
> 
> BTW: Currently my test windows box is down - so I can't check if this
> is supporsed to work with MS compilers.

Looks like parmetis does compile with MS compilers. Please try try the
attached patch.

cd petsc-2.3.3
patch -Np1 < parmetis-win.patch
rm -rf externalpackage/ParMetis*
./config/configure.py .....

This fix will be in petsc-dev.

Satish
-------------- next part --------------
diff -r 4041e3152979 python/PETSc/packages/ParMetis.py
--- a/python/PETSc/packages/ParMetis.py	Mon Apr 21 11:20:42 2008 -0500
+++ b/python/PETSc/packages/ParMetis.py	Mon Apr 28 21:15:01 2008 -0500
@@ -5,7 +5,7 @@
 class Configure(PETSc.package.Package):
   def __init__(self, framework):
     PETSc.package.Package.__init__(self, framework)
-    self.download     = ['hg://petsc.cs.iit.edu/petsc/ParMetis-dev','ftp://ftp.mcs.anl.gov/pub/petsc/externalpackages/ParMetis-dev-p1.tar.gz']
+    self.download     = ['hg://petsc.cs.iit.edu/petsc/ParMetis-dev','ftp://ftp.mcs.anl.gov/pub/petsc/externalpackages/ParMetis-dev-p2.tar.gz']
     self.functions    = ['ParMETIS_V3_PartKway']
     self.includes     = ['parmetis.h']
     self.liblist      = [['libparmetis.a','libmetis.a']]
@@ -27,8 +27,9 @@
     installDir     = os.path.join(parmetisDir, self.arch.arch)
     makeinc        = os.path.join(parmetisDir,'make.inc')
     installmakeinc = os.path.join(installDir,'make.inc')
-    configheader   = os.path.join(parmetisDir,'ParMETISLib','configureheader.h')
-
+    metisconfigheader    = os.path.join(parmetisDir,'METISLib','configureheader.h')
+    parmetisconfigheader = os.path.join(parmetisDir,'ParMETISLib','configureheader.h')
+    
     # Configure ParMetis 
     if os.path.isfile(makeinc):
       os.unlink(makeinc)
@@ -63,7 +64,8 @@
     
     if not os.path.isfile(installmakeinc) or not (self.getChecksum(installmakeinc) == self.getChecksum(makeinc)):
       self.framework.log.write('Have to rebuild ParMetis, make.inc != '+installmakeinc+'\n')
-      self.framework.outputHeader(configheader)
+      self.framework.outputHeader(metisconfigheader)
+      self.framework.outputHeader(parmetisconfigheader)
       try:
         self.logPrintBox('Compiling & installing Parmetis; this may take several minutes')
         output  = config.base.Configure.executeShellCommand('cd '+parmetisDir+'; make clean; make lib; make minstall; make clean', timeout=2500, log = self.framework.log)[0]


More information about the petsc-users mailing list