[petsc-users] Compiling PETSc on Windows with Cygwin: errors with `win32fe cl`; okay to use `gcc`, `g++`, `gfortran` as compilers instead of `win32cf cl`?
Brian Merchant
bhmerchant at gmail.com
Sat Nov 21 15:31:30 CST 2015
Barry, Satish,
Thank you for your time and explanations.
Based on what you have explained, I think it will indeed be much easier for
me to just build and use PETSc on my Linux system, since I don't build my
own Python (I use whatever comes with the Anaconda Python distribution
package). So, for me, it would be better to use PETSc with the Anaconda
distribution for Unix-like systems.
Thanks again,
Brian
On Sat, Nov 21, 2015 at 1:17 PM, Barry Smith <bsmith at mcs.anl.gov> wrote:
>
> > On Nov 21, 2015, at 3:05 PM, Brian Merchant <bhmerchant at gmail.com>
> wrote:
> >
> > > [however you can't build petsc with cygwin/gnu compilers - and then
> > link in with an application using MS compilers]
> >
> > Could you tell me a little more about what you mean here? (sorry, I am a
> newbie) Is it that if I make an application say in Visual Studio, and
> attempt to use that application to call PETSc functions compiled with
> Cygwin, then I will run into trouble?
>
> Brian,
>
> If your application is in Visual Studio then you MUST build PETSc with
> the Microsoft/Intel compilers, you cannot use the cygwin gnu compilers.
>
> >
> > I contacted this group: http://www2.msic.ch/Software
> > and got the latest build from them that is supposed to work with Visual
> Studio; which addresses your MS compilers concern?
>
> Unfortunately this is the previous release of PETSc so is somewhat out
> of date.
>
> It is very strange that when you tried building you got garbage in the
> configure.log file. Can you try again (without the \ in compiler name
> business for any compiler.)
> >
> > However, I also want to use petsc4py Python bindings with PETSc, so I
> shouldn't be in trouble there if I use Cygwin, right?
>
> If you want to use petsc4py Python on a Windows machine then you can
> try that with the Cygwin Gnu compilers (and the Cygwin python). I don't
> know if anyone has ever done it so some issues that need fixing may come up
> but it should be possible.
>
> It is likely a great deal of work to get the petsc4py Python bindings
> working with Visual Studio code and the Windows python all together. That
> would be completely new territory.
>
> Barry
>
> >
> > Kind regards,
> > Brian
> >
> > On Sat, Nov 21, 2015 at 12:55 PM, Satish Balay <balay at mcs.anl.gov>
> wrote:
> > Hm - If you can work with cygwin/gnu compilers - then you can build
> > petsc with them - and use it.
> >
> > [however you can't build petsc with cygwin/gnu compilers - and then
> > link in with an application using MS compilers]
> >
> > Satish
> >
> > On Sat, 21 Nov 2015, Brian Merchant wrote:
> >
> > > Hi all,
> > >
> > > I'd like to try and install PETSc on Windows (even though I have been
> > > forewarned that it is better to simply install it on a unix system).
> > >
> > > Some information about my system:
> > > * Windows 10 Pro, 64 bit
> > > * latest Cygwin with make, gcc, g++, gfortran installed
> > >
> > > The PETSc installation instructions suggest that I run the following
> > > command:
> > >
> > > ./configure --with-cc="win32fe cl" --with-fc="win32fe ifort"
> > > --with-cxx="win32fe\ cl" --download-fblaslapack\
> > >
> > > However, that results in the following error:
> > >
> > > C compiler you provided with -with-cc=win32fe cl does not work.
> > > Cannot compile C with /cygdrive/a/petsc/bin/win32fe/win32fe cl.
> > >
> > >
> > > The answer to this stackexchange question:
> > >
> http://stackoverflow.com/questions/30229620/petsc-build-error-c-compiler-does-not-work
> > >
> > > recommends the following command instead (with escaped whitespace):
> > >
> > > ./configure --with-cc="win32fe\ cl" --with-fc="win32fe\ ifort"
> > > --with-cxx="win32fe\ cl" --download-fblaslapack
> > >
> > > Running that command results in the following error (note no second
> line in
> > > error):
> > >
> > > C compiler you provided with -with-cc=win32fe\ cl does not work.
> > >
> > > In both cases, the configure.log output only contains (I do not use
> Chinese
> > > characters, these were in the file):
> > >
> > > > 㰡祳汭湩㹫arch-mswin-c-debug/lib/petsc/conf/configure.log
> > >
> > > What should I do? Also, do `gcc`/`g++` compiled programs not work on
> > > Windows? I ask because if I simply run the suggested command in the
> "Quick
> > > Installation" guide, using `gcc` and `g++`; then I don't get
> compilation
> > > errors. Would it be okay to simply use those compilers then?
> > >
> > > Kind regards,
> > > Brian
> > >
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20151121/f1b0be92/attachment-0001.html>
More information about the petsc-users
mailing list