<html aria-label="message body"><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><div><br></div> Change<div><br></div><div>__attribute__((packed))</div><div><br></div><div>to </div><div><br></div><div>/* __attribute__((packed)) */ </div><div><br></div><div>in include/petscmath.h </div><div><br></div><div>and run make again.</div><div><br></div><div>I think you should install a new version of Microsoft's compilers etc.</div><div><br></div><div> Barry</div><div><br id="lineBreakAtBeginningOfMessage"><div><br><blockquote type="cite"><div>On Nov 13, 2025, at 3:53 AM, 程奔 <202321009113@mail.scut.edu.cn> wrote:</div><br class="Apple-interchange-newline"><div><meta charset="UTF-8"><div class="default-font-1763024025496" style="font-size: 14px; font-family: 宋体, arial, Verdana, sans-serif; caret-color: rgb(0, 0, 0); font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><p style="margin: 0px 0px 14px;">Hi Barry</p><p style="margin: 0px 0px 14px;"><br></p>Thanks for your advice.<br>I use AI help me that change the file on the petsc-3.24.1/arch-mswin-c-opt/externalpackages/petsc-pkg-parmetis-f5e3aab04fd5/headers/gk_arch. <br><p style="margin: 0px 0px 14px;"><br></p><p style="margin: 0px 0px 14px;">The change is from: </p><span style="color: rgb(229, 51, 51);">#ifdef __MSC__ <br> #include "ms_stdint.h"<br> #include "ms_inttypes.h"<br> #include "ms_stat.h" <br>#else<br>#ifndef SUNOS<br> #include <stdint.h><br>#endif<br>#if !defined(WIN32) && !defined(__MINGW32__)<br> #include <sys/resource.h><br>#endif<br> #include <inttypes.h><br> #include <sys/types.h><br> #include <sys/time.h><br></span><p style="margin: 0px 0px 14px;"><span style="color: rgb(229, 51, 51);">#endif</span></p><p style="margin: 0px 0px 14px;"><span style="">To:</span></p><p style="margin: 0px 0px 14px;"><span style="color: rgb(0, 102, 0);">#if (defined(__MSC__) || defined(_MSC_VER)) && defined(_MSC_VER) && _MSC_VER < 1900<br> #include "ms_stdint.h"<br> #include "ms_inttypes.h"<br> #include "ms_stat.h"<br>#else<br>#ifndef SUNOS<br> #include <stdint.h><br>#endif<br>#if !defined(WIN32) && !defined(__MINGW32__) && !defined(_MSC_VER)<br> #include <sys/resource.h><br>#endif<br> #include <inttypes.h><br> #include <sys/types.h><br>#if !defined(_MSC_VER)<br> #include <sys/time.h><br>#endif<br>#endif</span></p><p style="margin: 0px 0px 14px;"><span style="color: rgb(0, 102, 0);"><br></span></p><p style="margin: 0px 0px 14px;"><span style="color: rgb(0, 102, 0);"><span style="">Then I configure the PETSc:</span></span></p><p style="margin: 0px 0px 14px;"><span style="color: rgb(0, 102, 0);"><span style=""><span style="text-wrap-mode: wrap;">./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</span></span></span></p><p style="margin: 0px 0px 14px;">It seems good, but then I make it</p><p style="margin: 0px 0px 14px;"><span style="text-wrap-mode: wrap;">it have the error:</span></p><p style="margin: 0px 0px 14px;"><br></p><p style="margin: 0px 0px 14px;">make[3]: *** [gmakefile:211: arch-mswin-c-opt/obj/src/sys/objects/device/interface/mark_dcontext.o] Error 2<br>make[3]: Leaving directory '/cygdrive/g/mypetsc/petsc-3.24.1'<br>make[2]: *** [/cygdrive/g/mypetsc/petsc-3.24.1/lib/petsc/conf/rules_doc.mk:5: libs] Error 2<br>make[2]: Leaving directory '/cygdrive/g/mypetsc/petsc-3.24.1'<br>**************************ERROR*************************************<br> Error during compile, check arch-mswin-c-opt/lib/petsc/conf/make.log<br> Send it and arch-mswin-c-opt/lib/petsc/conf/configure.log to<span class="Apple-converted-space"> </span><a href="mailto:petsc-maint@mcs.anl.gov">petsc-maint@mcs.anl.gov</a><br>********************************************************************<br>make[1]: *** [makefile:44: all] Error 1<br>make: *** [GNUmakefile:9: all] Error 2<br></p><div><br></div><p style="margin: 0px 0px 14px;"><span style="text-wrap-mode: wrap;">The new configure.log and make.log is attached below.</span></p><p style="margin: 0px 0px 14px;">I don't know if it is caused by the change I made or the other problems.</p><p style="margin: 0px 0px 14px;"><br></p><p style="margin: 0px 0px 14px;"><span style="text-wrap-mode: wrap;">So I ask for your help again. </span><br style="text-wrap-mode: wrap;"><span style="text-wrap-mode: wrap;">Looking forward your reply!</span><br style="text-wrap-mode: wrap;"><br style="text-wrap-mode: wrap;"><br style="text-wrap-mode: wrap;"><span style="text-wrap-mode: wrap;">sinserely,</span><br style="text-wrap-mode: wrap;"><span style="text-wrap-mode: wrap;">Cheng.</span></p><p style="margin: 0px 0px 14px;"><br><span style="color: rgb(229, 51, 51);"></span><br></p><p style="margin: 0px 0px 14px;"><span style="color: rgb(229, 51, 51);"><br></span></p><br>-----原始邮件-----<br>发件人: "Barry Smith" <<a href="mailto:bsmith@petsc.dev">bsmith@petsc.dev</a>><br>发送时间: 2025-11-13 00:03:50 (星期四)<br>收件人: 程奔 <<a href="mailto:202321009113@mail.scut.edu.cn">202321009113@mail.scut.edu.cn</a>><br>抄送: PETSc <<a href="mailto:petsc-users@mcs.anl.gov">petsc-users@mcs.anl.gov</a>><br>主题: Re: [petsc-users] Error in configuring PETSc with Cygwin on Windows by using MS-MPI<br><br>G:\VisualStudio2022\VC\Tools\MSVC\14.37.32822\include\stdint.h(37): error C2371: 'int_fast16_t': redefinition; different basic types<br>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'<br>G:\VisualStudio2022\VC\Tools\MSVC\14.37.32822\include\stdint.h(41): error C2371: 'uint_fast16_t': redefinition; different basic types<br>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'<br>G:\VisualStudio2022\VC\Tools\MSVC\14.37.32822\include\stdint.h(49): warning C4005: 'INT8_MIN': macro redefinition<br>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'<br><br>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).<br><br>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.<br><br>$ git grep stdint.h<br>headers/gk_arch.h: #include "ms_stdint.h"<br>headers/gk_arch.h: #include <stdint.h><br>headers/ms_inttypes.h:#include "ms_stdint.h"<br>headers/ms_stdint.h:// ISO C9x compliant stdint.h for Microsoft Visual Studio<br><br>You have a fairly old VisualStudio, 2022. Can you upgrade to the latest? Let us know if this resolves the problem.<br><br>Barry<br><br><br><br><br> <br><br><br><br><br><br>On Nov 12, 2025, at 5:29 AM, 程奔 <<a href="mailto:202321009113@mail.scut.edu.cn">202321009113@mail.scut.edu.cn</a>> wrote:<br><br>Hi Barry<br>Thanks for your reply.<br>I check the package parmetis,and the "petsc-pkg-parmetis-45100eac9301.tar.gz" is form <a href="https://urldefense.us/v3/__https://bitbucket.org/petsc/pkg-parmetis/get/v4.0.3.tar.gz__;!!G_uCfscf7eWS!fxWXWboQRNUYFGMA0mW58ZDCE6A4aGfOZvzcj0EG2lHsj_174DkztA-YDWKfPXg9WJxjRkZ13WsNy2TXkQuzMkw$">https://bitbucket.org/petsc/pkg-parmetis/get/v4.0.3.tar.gz</a>. So I made a mistake about the package.<br>Then I download the package form <a href="https://urldefense.us/v3/__https://bitbucket.org/petsc/pkg-parmetis/get/v4.0.3-p9.tar.gz__;!!G_uCfscf7eWS!fxWXWboQRNUYFGMA0mW58ZDCE6A4aGfOZvzcj0EG2lHsj_174DkztA-YDWKfPXg9WJxjRkZ13WsNy2TXPQoo3R0$">https://bitbucket.org/petsc/pkg-parmetis/get/v4.0.3-p9.tar.gz</a> and it is "petsc-pkg-parmetis-f5e3aab04fd5.tar.gz" <br><br><br>Then the compiler option in configuration is:<br>./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<br><br>but it still have the same error:<br>*********************************************************************************************<br>=============================================================================================<br>=============================================================================================<br> Configuring PARMETIS with CMake; this may take several minutes<br>=============================================================================================<br>=============================================================================================<br> Compiling and installing PARMETIS; this may take several minutes<br>=============================================================================================<br><br><br>*********************************************************************************************<br> UNABLE to CONFIGURE with GIVEN OPTIONS (see configure.log for details):<br>---------------------------------------------------------------------------------------------<br> Error running make on PARMETIS<br><br><br>*********************************************************************************************<br><br><br>The new configure.log is attached below.<br>So I ask for your help again. <br>Looking forward your reply!<br><br><br>sinserely,<br>Cheng.<br><br><br><br><br>-----原始邮件-----<br>发件人: "Barry Smith" <<a href="mailto:bsmith@petsc.dev">bsmith@petsc.dev</a>><br>发送时间: 2025-11-11 23:29:01 (星期二)<br>收件人: "Matthew Knepley" <<a href="mailto:knepley@gmail.com">knepley@gmail.com</a>><br>抄送: 程奔 <<a href="mailto:ctchengben@mail.scut.edu.cn">ctchengben@mail.scut.edu.cn</a>>, <a href="mailto:petsc-users@mcs.anl.gov">petsc-users@mcs.anl.gov</a><br>主题: Re: [petsc-users] Error in configuring PETSc with Cygwin on Windows by using MS-MPI<br><br><br> Where/how did you obtain /cygdrive/g/mypetsc/petsc-pkg-parmetis-45100eac9301.tar.gz ? Was it from PETSc ./configure?<br><br> self.version = '4.0.3'<br> self.versionname = 'PARMETIS_MAJOR_VERSION.PARMETIS_MINOR_VERSION.PARMETIS_SUBMINOR_VERSION'<br> self.gitcommit = 'v'+self.version+'-p9'<br> self.download = ['<a href="git://https//bitbucket.org/petsc/pkg-parmetis.git','https://bitbucket.org/petsc/pkg-parmetis/get/'+self.gitcommit+'.tar.gz">git://https://bitbucket.org/petsc/pkg-parmetis.git','https://bitbucket.org/petsc/pkg-parmetis/get/'+self.gitcommit+'.tar.gz</a>']<br><br><br><br>On Nov 11, 2025, at 7:35 AM, Matthew Knepley <<a href="mailto:knepley@gmail.com">knepley@gmail.com</a>> wrote:<br><br>On Tue, Nov 11, 2025 at 4:44 AM 程奔 <<a href="mailto:ctchengben@mail.scut.edu.cn">ctchengben@mail.scut.edu.cn</a>> wrote:<br>Hello,<br>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:<br>1. PETSc: version 3.14.1<br>2. VS: version 2022 <br>3. MS MPI: download Microsoft MPI v10.1.2<br>4. Cygwin<br><br>Quick question: Have you considered installing on WSL? I have had much better luck with that on Windows.<br><br>This seems to be an incompatibility of ParMetis Windows support and your version:<br><br>G:\VisualStudio2022\VC\Tools\MSVC\14.37.32822\include\stdint.h(37): error C2371: 'int_fast16_t': redefinition; different basic types^M<br>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<br>G:\VisualStudio2022\VC\Tools\MSVC\14.37.32822\include\stdint.h(41): error C2371: 'uint_fast16_t': redefinition; different basic types^M<br>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 <br><br> Thanks,<br><br> Matt<br><br>And the compiler option in configuration is:<br>./configure --with-debugging=0 --with-cc=cl --with-fc=0 --with-cxx=cl <br>--download-f2cblaslapack=/cygdrive/g/mypetsc/f2cblaslapack-3.8.0.q2.tar.gz <br>--with-mpi-include=\[/cygdrive/g/MSmpi/MicrosoftSDKs/Include,/cygdrive/g/MSmpi/MicrosoftSDKs/Include/x64\] <br>--with-mpi-lib=\[/cygdrive/g/MSmpi/MicrosoftSDKs/Lib/x64/msmpifec.lib,/cygdrive/g/MSmpi/MicrosoftSDKs/Lib/x64/msmpi.lib\] <br>--with-mpiexec=/cygdrive/g/MSmpi/MicrosoftMPI/Bin/mpiexec <br>--download-metis=/cygdrive/g/mypetsc/petsc-pkg-metis-69fb26dd0428.tar.gz <br>--download-parmetis=/cygdrive/g/mypetsc/petsc-pkg-parmetis-45100eac9301.tar.gz <br>--with-strict-petscerrorcode=0 --with-64-bit-indices --download-hdf5=/cygdrive/g/mypetsc/hdf5-1.14.3-p1.tar.bz2<br><br><br><br><br><br><br>but there return an error:<br>*********************************************************************************************<br>=============================================================================================<br>=============================================================================================<br> Configuring PARMETIS with CMake; this may take several minutes<br>=============================================================================================<br>=============================================================================================<br> Compiling and installing PARMETIS; this may take several minutes<br>=============================================================================================<br><br><br>*********************************************************************************************<br> UNABLE to CONFIGURE with GIVEN OPTIONS (see configure.log for details):<br>---------------------------------------------------------------------------------------------<br> Error running make on PARMETIS<br><br><br>*********************************************************************************************<br><br><br>The configure.log is attached below.<br>So I write this email to report my problem and ask for your help. <br>Looking forward your reply!<br><br><br>sinserely,<br>Cheng.<br><br><br>-- <br>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener<br><br><a href="https://urldefense.us/v3/__https://www.cse.buffalo.edu/*knepley/__;fg!!G_uCfscf7eWS!fxWXWboQRNUYFGMA0mW58ZDCE6A4aGfOZvzcj0EG2lHsj_174DkztA-YDWKfPXg9WJxjRkZ13WsNy2TXA-nTYTc$">https://www.cse.buffalo.edu/~knepley/</a><br><br><br></div></div></blockquote></div></div></body></html>