Thanks! so what can I do to compile if I want to use PETsc in VS2010?
I have tried using g++: ./configure --with-cxx=g++ --with-fc=0 --download-f2blaslapck --download-mpich then make PETSC_ARCH=arch-mswin-cxx-debug all make PETSC_ARCH=arch-mswin-cxx-debug test it shows: Using PETSC_DIR=/petsc-3.3-p6 and PETSC_ARCH=arch-mswin-cxx-debug /usr/bin/sh: line 20: 10916 Segmentation fault " some path here"(I omitted) Possible error running C/C++ src/snes/examples/tutorials/ex19 with 1 MPI process See http://www.mcs.anlgov/petsc/documentation/faq.html /usr/bin/sh: line 20: 11780 Segmentation fault "some path here"(I omitted) Possible error running C/C++ src/snes/examples/tutorials/ex19 with 2 MPI processes See http://www.mcs.anl.gov/petsc/documentation/faq.html Completed test examples Hao ________________________________________ ???: Jed Brown [five9a2 at gmail.com] ?? Jed Brown [jedbrown at mcs.anl.gov] ????: 2013?5?9? 21:15 ???: ?? ??: Re: PETsc problem ?? <hao.yu at peraglobal.com> writes: > Dear Jed Brown, > > I am sorry to trouble you! I am a PhD in math dept. at U of Minnesota, > currently using PETsc. I have a problem , it can't successfully > compile in VS2010 after installation. Because I am using Windows, so > under cygwin, I use: > > ./configure --with-cc=gcc -with-fc=0 --download-f2blaslapck > --download-mpich make all test You can't mix gcc here and VS2010 later because they are not compatible. > then it completes, but after I include , for example, "petscksp.h", > the error message after compling: > > Error 4 error C3861: '__builtin_expect': identifier not found > e:\cygwin\home\petsc-3.3-p6\include\petsclog.h 332 1 HelloFluids2 Configure tests whether the compiler supports __builtin_expect. There are probably many other incompatibilities. If you have any further questions, please send email to either petsc-users at mcs.anl.gov or petsc-maint at mcs.anl.gov.
