[petsc-users] Error in configuring PETSc with Cygwin on Windows by using MS-MPI
Barry Smith
bsmith at petsc.dev
Wed Nov 12 10:03:50 CST 2025
G:\VisualStudio2022\VC\Tools\MSVC\14.37.32822\include\stdint.h(37): error C2371: 'int_fast16_t': redefinition; different basic types
G:\mypetsc\petsc-3.24.1\arch-mswin-c-opt\externalpackages\petsc-pkg-parmetis-f5e3aab04fd5\headers\ms_stdint.h(80): note: see declaration of 'int_fast16_t'
G:\VisualStudio2022\VC\Tools\MSVC\14.37.32822\include\stdint.h(41): error C2371: 'uint_fast16_t': redefinition; different basic types
G:\mypetsc\petsc-3.24.1\arch-mswin-c-opt\externalpackages\petsc-pkg-parmetis-f5e3aab04fd5\headers\ms_stdint.h(84): note: see declaration of 'uint_fast16_t'
G:\VisualStudio2022\VC\Tools\MSVC\14.37.32822\include\stdint.h(49): warning C4005: 'INT8_MIN': macro redefinition
G:\mypetsc\petsc-3.24.1\arch-mswin-c-opt\externalpackages\petsc-pkg-parmetis-f5e3aab04fd5\headers\ms_stdint.h(107): note: see previous definition of 'INT8_MIN'
Parmetis has its own definitions for many C standard types, etc in headers\ms_stdint.h that duplicate what is available in stdint.h on Unix systems. Normally, this gets included when __MSC_ is defined instead of stdint.h (in gk_arch.h).
But for some reason, with your system it appears that Microsoft's stdint.h is also getting included; presumably brought in through some other system include file since it is only included in one place.
$ git grep stdint.h
headers/gk_arch.h: #include "ms_stdint.h"
headers/gk_arch.h: #include <stdint.h>
headers/ms_inttypes.h:#include "ms_stdint.h"
headers/ms_stdint.h:// ISO C9x compliant stdint.h for Microsoft Visual Studio
You have a fairly old VisualStudio, 2022. Can you upgrade to the latest? Let us know if this resolves the problem.
Barry
> On Nov 12, 2025, at 5:29 AM, 程奔 <202321009113 at mail.scut.edu.cn> wrote:
>
> Hi Barry
>
> Thanks for your reply.
>
> I check the package parmetis,and the "petsc-pkg-parmetis-45100eac9301.tar.gz" is form https://urldefense.us/v3/__https://bitbucket.org/petsc/pkg-parmetis/get/v4.0.3.tar.gz__;!!G_uCfscf7eWS!anttFLuihC7sv3xitFbNls4Ab1QfxVAGNr1EttbSarqqFMdkXJIg9_aN1RakIYDBWqtKJJM8jYn3SxcuaKW6S2Q$ . So I made a mistake about the package.
>
> Then I download the package form https://urldefense.us/v3/__https://bitbucket.org/petsc/pkg-parmetis/get/v4.0.3-p9__;!!G_uCfscf7eWS!anttFLuihC7sv3xitFbNls4Ab1QfxVAGNr1EttbSarqqFMdkXJIg9_aN1RakIYDBWqtKJJM8jYn3Sxcu4By6gtk$ <https://urldefense.us/v3/__https://bitbucket.org/petsc/pkg-parmetis/get/v4.0.3-p9.tar.gz__;!!G_uCfscf7eWS!anttFLuihC7sv3xitFbNls4Ab1QfxVAGNr1EttbSarqqFMdkXJIg9_aN1RakIYDBWqtKJJM8jYn3SxcuBzzHK7w$ >.tar.gz <https://urldefense.us/v3/__https://bitbucket.org/petsc/pkg-parmetis/get/v4.0.3-p9.tar.gz__;!!G_uCfscf7eWS!anttFLuihC7sv3xitFbNls4Ab1QfxVAGNr1EttbSarqqFMdkXJIg9_aN1RakIYDBWqtKJJM8jYn3SxcuBzzHK7w$ > and it is "petsc-pkg-parmetis-f5e3aab04fd5.tar.gz"
>
>
>
>
> Then the compiler option in configuration is:
> ./configure --with-debugging=0 --with-cc=cl --with-fc=0 --with-cxx=cl --download-f2cblaslapack=/cygdrive/g/mypetsc/f2cblaslapack-3.8.0.q2.tar.gz --with-mpi-include=\[/cygdrive/g/MSmpi/MicrosoftSDKs/Include,/cygdrive/g/MSmpi/MicrosoftSDKs/Include/x64\] --with-mpi-lib=\[/cygdrive/g/MSmpi/MicrosoftSDKs/Lib/x64/msmpifec.lib,/cygdrive/g/MSmpi/MicrosoftSDKs/Lib/x64/msmpi.lib\] --with-mpiexec=/cygdrive/g/MSmpi/MicrosoftMPI/Bin/mpiexec --download-metis=/cygdrive/g/mypetsc/petsc-pkg-metis-69fb26dd0428.tar.gz --download-parmetis=/cygdrive/g/mypetsc/petsc-pkg-parmetis-f5e3aab04fd5.tar.gz --with-strict-petscerrorcode=0 --with-64-bit-indices
>
>
> but it still have the same error:
> *********************************************************************************************
> =============================================================================================
> =============================================================================================
> Configuring PARMETIS with CMake; this may take several minutes
> =============================================================================================
> =============================================================================================
> Compiling and installing PARMETIS; this may take several minutes
> =============================================================================================
>
>
> *********************************************************************************************
> UNABLE to CONFIGURE with GIVEN OPTIONS (see configure.log for details):
> ---------------------------------------------------------------------------------------------
> Error running make on PARMETIS
>
>
>
> *********************************************************************************************
>
>
>
>
> The new configure.log is attached below.
>
> So I ask for your help again.
>
>
> Looking forward your reply!
>
>
> sinserely,
> Cheng.
>
>
>
>
>
>
>
>
> -----原始邮件-----
> 发件人: "Barry Smith" <bsmith at petsc.dev>
> 发送时间: 2025-11-11 23:29:01 (星期二)
> 收件人: "Matthew Knepley" <knepley at gmail.com>
> 抄送: 程奔 <ctchengben at mail.scut.edu.cn>, petsc-users at mcs.anl.gov
> 主题: Re: [petsc-users] Error in configuring PETSc with Cygwin on Windows by using MS-MPI
>
>
> Where/how did you obtain /cygdrive/g/mypetsc/petsc-pkg-parmetis-45100eac9301.tar.gz ? Was it from PETSc ./configure?
>
> self.version = '4.0.3'
> self.versionname = 'PARMETIS_MAJOR_VERSION.PARMETIS_MINOR_VERSION.PARMETIS_SUBMINOR_VERSION'
> self.gitcommit = 'v'+self.version+'-p9'
> self.download = ['git://https://bitbucket.org/petsc/pkg-parmetis.git','https://bitbucket.org/petsc/pkg-parmetis/get/'+self.gitcommit+'.tar.gz']
>
>
>
>> On Nov 11, 2025, at 7:35 AM, Matthew Knepley <knepley at gmail.com> wrote:
>>
>> On Tue, Nov 11, 2025 at 4:44 AM 程奔 <ctchengben at mail.scut.edu.cn <mailto:ctchengben at mail.scut.edu.cn>> wrote:
>>> Hello,
>>> Recently I try to install PETSc with Cygwin since I'd like to use PETSc with Visual Studio on Windows10 plateform.For the sake of clarity, I firstly list the softwares/packages used below:
>>> 1. PETSc: version 3.14.1
>>> 2. VS: version 2022
>>> 3. MS MPI: download Microsoft MPI v10.1.2
>>> 4. Cygwin
>>
>> Quick question: Have you considered installing on WSL? I have had much better luck with that on Windows.
>>
>> This seems to be an incompatibility of ParMetis Windows support and your version:
>>
>> G:\VisualStudio2022\VC\Tools\MSVC\14.37.32822\include\stdint.h(37): error C2371: 'int_fast16_t': redefinition; different basic types^M
>> G:\mypetsc\petsc-3.24.1\arch-mswin-c-opt\externalpackages\petsc-pkg-parmetis-f5e3aab04fd5\headers\ms_stdint.h(80): note: see declaration of 'int_fast16_t'^M
>> G:\VisualStudio2022\VC\Tools\MSVC\14.37.32822\include\stdint.h(41): error C2371: 'uint_fast16_t': redefinition; different basic types^M
>> G:\mypetsc\petsc-3.24.1\arch-mswin-c-opt\externalpackages\petsc-pkg-parmetis-f5e3aab04fd5\headers\ms_stdint.h(84): note: see declaration of 'uint_fast16_t'^M
>>
>> Thanks,
>>
>> Matt
>>
>>>
>>> And the compiler option in configuration is:
>>> ./configure --with-debugging=0 --with-cc=cl --with-fc=0 --with-cxx=cl
>>> --download-f2cblaslapack=/cygdrive/g/mypetsc/f2cblaslapack-3.8.0.q2.tar.gz
>>> --with-mpi-include=\[/cygdrive/g/MSmpi/MicrosoftSDKs/Include,/cygdrive/g/MSmpi/MicrosoftSDKs/Include/x64\]
>>> --with-mpi-lib=\[/cygdrive/g/MSmpi/MicrosoftSDKs/Lib/x64/msmpifec.lib,/cygdrive/g/MSmpi/MicrosoftSDKs/Lib/x64/msmpi.lib\]
>>> --with-mpiexec=/cygdrive/g/MSmpi/MicrosoftMPI/Bin/mpiexec
>>> --download-metis=/cygdrive/g/mypetsc/petsc-pkg-metis-69fb26dd0428.tar.gz
>>> --download-parmetis=/cygdrive/g/mypetsc/petsc-pkg-parmetis-45100eac9301.tar.gz
>>> --with-strict-petscerrorcode=0 --with-64-bit-indices --download-hdf5=/cygdrive/g/mypetsc/hdf5-1.14.3-p1.tar.bz2
>>>
>>>
>>>
>>>
>>>
>>>
>>> but there return an error:
>>> *********************************************************************************************
>>> =============================================================================================
>>> =============================================================================================
>>> Configuring PARMETIS with CMake; this may take several minutes
>>> =============================================================================================
>>> =============================================================================================
>>> Compiling and installing PARMETIS; this may take several minutes
>>> =============================================================================================
>>>
>>>
>>> *********************************************************************************************
>>> UNABLE to CONFIGURE with GIVEN OPTIONS (see configure.log for details):
>>> ---------------------------------------------------------------------------------------------
>>> Error running make on PARMETIS
>>>
>>>
>>> *********************************************************************************************
>>>
>>>
>>>
>>> The configure.log is attached below.
>>>
>>> So I write this email to report my problem and ask for your help.
>>>
>>>
>>> Looking forward your reply!
>>>
>>>
>>> sinserely,
>>> Cheng.
>>
>>
>>
>> --
>> What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.
>> -- Norbert Wiener
>>
>> https://urldefense.us/v3/__https://www.cse.buffalo.edu/*knepley/__;fg!!G_uCfscf7eWS!anttFLuihC7sv3xitFbNls4Ab1QfxVAGNr1EttbSarqqFMdkXJIg9_aN1RakIYDBWqtKJJM8jYn3SxcurPKaHgI$ <https://urldefense.us/v3/__http://www.cse.buffalo.edu/*knepley/__;fg!!G_uCfscf7eWS!dLmtriOEmUVP2A1oc3Mf52cboEA1wjKSpm11szn5VzeEqH4dEZEbvnyoNwoTWleZIFdbzRu6B635UNPR25nq$>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20251112/ec242ce8/attachment-0002.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: configure.log
Type: application/octet-stream
Size: 1253211 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20251112/ec242ce8/attachment-0001.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20251112/ec242ce8/attachment-0003.html>
More information about the petsc-users
mailing list