[petsc-dev] Is there any possibility to compile PETCs directly on Windows?

Matthew Knepley knepley at gmail.com
Mon Jul 15 20:21:34 CDT 2019

On Mon, Jul 15, 2019 at 8:03 PM Xinghua Hao via petsc-dev <
petsc-dev at mcs.anl.gov> wrote:

> We used to install it within WSL(Windows Subsystem for Linux)  and I just
> transferred to a Docker container environment. It works pretty well on both
> of this two. So I believe using any other kind of intermediate level(like
> Cygwin) to simulate a Linux-like environment would do nothing better.
> The only question(may sound a little stupid) I am still curious about is
> that why can’t we directly compile PETCs on Windows? Since we write PETCs
> in languages compilable cross-platform, this should not be where the
> problems come from. So could you offer me some examples which show the
> PETCs is heavily depended on Linux environment? Some high-level ideas or
> instructions guiding me to look for them myself are also appreciated. What’s
> more, is it possible for us to modify the source code to compile it
> directly on Windows? Is it practical?

This is not a source code problem. There are two main stumbling blocks:

  1) Windows compilers

       They take options in a very different way. We have the 'win32fe'
compiler wrapper to handle this.

  2) System tools

      This is the main problem. We need tools that interact with the
system. Cygwin is mainly used to provide the bin-utils
      package, which allows our build system to function. We use Python,
make (not nmake), and also system utilities.



> Thanks,
> Xinghua

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://www.cse.buffalo.edu/~knepley/ <http://www.cse.buffalo.edu/~knepley/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20190715/7a6ddc83/attachment.html>

More information about the petsc-dev mailing list