[petsc-users] Error compiling Petsc-3.3 and metis using Visual C++ 2008

Satish Balay balay at mcs.anl.gov
Sun Jul 22 21:02:50 CDT 2012


On Sun, 22 Jul 2012, Mengda Wu wrote:

> Hi All,
> 
>    I am trying to compiling Petsc-3.3 using VC2008. The command I am using
> under cygwin command window is
> 
> ./config/configure.py --with-cc='cl' --with-fc=0  --with-cxx='cl'

Thats probably  --with-cc='win32fe cl' --with-cxx='win32fe cl' [for petsc build to work]

However cmake does not like the notation 'win32fe cl'. So
--download-metis is likely to fail. I'm not sure if its possible to
install metis/parmetis this way.

Perhaps its possible to install Metis separately with MS compiler
using non-cygwin cmake - and then specify -with-metis-include
--with-metis-lib options. [I haven't checked to see if this would work
or not]

BTW: PETSc does not use metis directly. Do you really need metis?

Satish

> --with-debugging=0 --download-f2cblaslapack --download-metis
> --with-sowing=0 --with-c2html -CFLAGS='-MD -wd4996' -CXXFLAGS='-MD -wd4996'
> 
>    f2cblaslapack is compiled fine. But the metis step has some errors
> (extracted from configure.log). BTW, I am using Cygwin's cmake.
> 
> ===========================================================================================
> Error running configure on METIS: Could not execute "cd
> /cygdrive/c/Library/Petsc/petsc-3.3/externalpackages/metis-5.0.2-p3/arch-mswin-c-opt
> && /usr/bin/cmake ..
> -DCMAKE_INSTALL_PREFIX=/cygdrive/c/Library/Petsc/petsc-3.3/arch-mswin-c-opt
> -DCMAKE_VERBOSE_MAKEFILE=1 -DGKLIB_PATH=../GKlib
> -DCMAKE_C_COMPILER="/cygdrive/c/Library/Petsc/petsc-3.3/bin/win32fe/win32fe
> cl" -DCMAKE_C_FLAGS:STRING="-MD -wd4996 -O2 "
> -DMETIS_USE_DOUBLEPRECISION=1":
> -- The C compiler identification is unknown
> -- The CXX compiler identification is MSVC
> -- Check for working C compiler:
> /cygdrive/c/Library/Petsc/petsc-3.3/bin/win32fe/win32fe cl
> -- Check for working C compiler:
> /cygdrive/c/Library/Petsc/petsc-3.3/bin/win32fe/win32fe cl -- broken
> -- Configuring incomplete, errors occurred!
> CMake Warning at /usr/share/cmake-2.8.7/Modules/Platform/CYGWIN.cmake:15
> (message):
>   CMake no longer defines WIN32 on Cygwin!
> 
>   (1) If you are just trying to build this project, ignore this warning or
>   quiet it by setting CMAKE_LEGACY_CYGWIN_WIN32=0 in your environment or in
>   the CMake cache.  If later configuration or build errors occur then this
>   project may have been written under the assumption that Cygwin is WIN32.
>   In that case, set CMAKE_LEGACY_CYGWIN_WIN32=1 instead.
> 
>   (2) If you are developing this project, add the line
> 
>     set(CMAKE_LEGACY_CYGWIN_WIN32 0) # Remove when CMake >= 2.8.4 is
> required
> 
>   at the top of your top-level CMakeLists.txt file or set the minimum
>   required version of CMake to 2.8.4 or higher.  Then teach your project to
>   build on Cygwin without WIN32.
> Call Stack (most recent call first):
>   /usr/share/cmake-2.8.7/Modules/CMakeSystemSpecificInformation.cmake:36
> (INCLUDE)
>   CMakeLists.txt:2 (project)
> 
> 
> CMake Error: your C compiler:
> "/cygdrive/c/Library/Petsc/petsc-3.3/bin/win32fe/win32fe cl" was not
> found.   Please set CMAKE_C_COMPILER to a valid compiler path or name.
> CMake Error: Internal CMake error, TryCompile configure of cmake failed
> CMake Error at /usr/share/cmake-2.8.7/Modules/CMakeTestCCompiler.cmake:52
> (MESSAGE):
>   The C compiler "/cygdrive/c/Library/Petsc/petsc-3.3/bin/win32fe/win32fe
> cl"
>   is not able to compile a simple test program.
> 
>   It fails with the following output:
> 
> 
> 
> 
> 
>   CMake will not be able to correctly generate this project.
> Call Stack (most recent call first):
>   CMakeLists.txt:2 (project)
> 
> 
> CMake Error: your C compiler:
> "/cygdrive/c/Library/Petsc/petsc-3.3/bin/win32fe/win32fe cl" was not
> found.   Please set CMAKE_C_COMPILER to a valid compiler path or name.
> *******************************************************************************
>   File "./config/configure.py", line 311, in petsc_configure
>     framework.configure(out = sys.stdout)
>   File
> "/cygdrive/c/Library/Petsc/petsc-3.3/config/BuildSystem/config/framework.py",
> line 933, in configure
>     child.configure()
>   File
> "/cygdrive/c/Library/Petsc/petsc-3.3/config/BuildSystem/config/package.py",
> line 526, in configure
>     self.executeTest(self.configureLibrary)
>   File
> "/cygdrive/c/Library/Petsc/petsc-3.3/config/BuildSystem/config/base.py",
> line 115, in executeTest
>     ret = apply(test, args,kargs)
>   File
> "/cygdrive/c/Library/Petsc/petsc-3.3/config/BuildSystem/config/package.py",
> line 453, in configureLibrary
>     for location, directory, lib, incl in self.generateGuesses():
>   File
> "/cygdrive/c/Library/Petsc/petsc-3.3/config/BuildSystem/config/package.py",
> line 229, in generateGuesses
>     d = self.checkDownload(1)
>   File
> "/cygdrive/c/Library/Petsc/petsc-3.3/config/BuildSystem/config/package.py",
> line 320, in checkDownload
>     return self.getInstallDir()
>   File
> "/cygdrive/c/Library/Petsc/petsc-3.3/config/BuildSystem/config/package.py",
> line 184, in getInstallDir
>     return os.path.abspath(self.Install())
>   File
> "/cygdrive/c/Library/Petsc/petsc-3.3/config/PETSc/packages/metis.py", line
> 76, in Install
>     raise RuntimeError('Error running configure on METIS: '+str(e))
> 
> 
> 
> 
> Mengda
> 



More information about the petsc-users mailing list