[petsc-dev] different compiler behavior in make libfast and make all

Jed Brown jedbrown at mcs.anl.gov
Mon Sep 9 20:21:50 CDT 2013


Chetan Jhurani <chetan.jhurani at gmail.com> writes:

> An update on this issue for future searches:
>
> I am able to reproduce this bug outside cygwin and outside
> petsc make/build system for a single petsc file
> (sbaijfact2.c) after configuring petsc in the usual manner.
>
> Note: scalar = complex<double>.
>
> It is a bug in cl.exe in two versions I tested: VS 2012 x64 on
> windows 7 x64 without VS updates (compiler version 17.00.50727.1)
> and with latest update number 3  (compiler version 17.00.60610.1).
>
> The error is not deterministic even if cl.exe is restricted
> to run on 1 out of 4 cores for compiling a single file.
> Otherwise cl.exe uses 4 threads and still dies due to
> similar internal errors.  (I thought perhaps the single-threaded
> invocation will fix this, but no...) The petsc source line
> numbers reported in the crash are also not same in
> different single-threaded cl.exe runs.

Have you reported the bug to Microsoft?

> The error happened in roughly 10% of 100 consecutive
> compilations of the file.  Happens with -O1 and -O2.
> But no error when optimization is off.  Although I
> have not gone so far as having a minimal workaround, two
> possible solutions are to have optimization off for select
> functions in a few files using #pragma or just turn off
> optimizations for three directories where such errors
> happened -
>
> src/mat/impls/sbaij/seq/sbstream
> src/mat/impls/sbaij/seq
> src/mat/impls/baij/seq

These directories have some of the kernels that stand the most chance of
benefiting from optimization.  If you break the files up, do the errors
go away?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20130909/1c11e75d/attachment.sig>


More information about the petsc-dev mailing list