[petsc-dev] CI error
Barry Smith
bsmith at petsc.dev
Mon Apr 12 23:25:11 CDT 2021
Yes, this is annoying and frustrating for us to have deal with this kind of thing, but imagine how annoying and frustrating it is for an average user who has 1/100th the HPC experience we do. This is why I like to have these fully resolved at the library level; yes it is more work for us; but less for the average user.
Barry
> On Apr 12, 2021, at 11:21 PM, Barry Smith <bsmith at petsc.dev> wrote:
>
>
> I like the diversity of slightly different test boxes. If all test boxes are the same than that limits what variants we test and reduces the usefulness of the CI; since users will face this diversity in their machines and end up with errors we never see before hand (which is bad).
>
> This kind of "after the fact initialization "for (q = 0; q < LANDAU_MAX_Q_FACE; q++) col_scale[q] = 0.0; " is unlikely to satisfy the various compilers and optimization levels. Best to figure out universally how to indicate when the variable is declared that it gets initialized suitably (for confused compilers that don't realize the initialized values are never used and so print warning messages).
>
>
> This seems to work for C++? https://icarus.cs.weber.edu/~dab/cs1410/textbook/7.Arrays/initialize.html <https://icarus.cs.weber.edu/~dab/cs1410/textbook/7.Arrays/initialize.html>
>
> https://stackoverflow.com/questions/201101/how-to-initialize-all-members-of-an-array-to-the-same-value <https://stackoverflow.com/questions/201101/how-to-initialize-all-members-of-an-array-to-the-same-value> seems to indicate one can initialize all entries in C with one {0} but who trusts the web or all compilers.
>
> Have you tried the C form?
>
> Barry
>
>
>
>
>> On Apr 12, 2021, at 8:06 AM, Satish Balay via petsc-dev <petsc-dev at mcs.anl.gov <mailto:petsc-dev at mcs.anl.gov>> wrote:
>>
>> This job gets run on either pj01 or pj02 - each have slightly different version of gcc. (and they behave differently wrt certain warnings)
>>
>> [trade-off with diversity in testing and having redundancy in available work machines - so jobs are not stuck on a single box]
>>
>> I guess I should somehow fix this (perhaps switch them all to same OS/versions].
>>
>> Satish
>>
>> On Sun, 11 Apr 2021, Mark Adams wrote:
>>
>>> This warning went away. i don't know why.
>>>
>>> On Sun, Apr 11, 2021 at 2:10 PM Mark Adams <mfadams at lbl.gov <mailto:mfadams at lbl.gov>> wrote:
>>>
>>>> I get this error in CI with complex float:
>>>> https://gitlab.com/petsc/petsc/-/jobs/1170144554 <https://gitlab.com/petsc/petsc/-/jobs/1170144554>
>>>>
>>>> I put in code earlier to fix this warning about uninitialized vars, but
>>>> now it does not seem to work:
>>>>
>>>> /home/glci/builds-stage1/AbTGp5-t/0/petsc/petsc/src/ts/utils/dmplexlandau/plexland.c:414:94:
>>>> error: ‘col_scale[4]’ may be used uninitialized in this function
>>>> [-Werror=maybe-uninitialized]
>>>> 2251 <https://gitlab.com/petsc/petsc/-/jobs/1170144554#L2251> PetscScalar
>>>> vals[LANDAU_MAX_Q_FACE*LANDAU_MAX_Q_FACE],row_scale[LANDAU_MAX_Q_FACE],col_scale[LANDAU_MAX_Q_FACE];
>>>>
>>>> Yet I have code to initialize col_scale:
>>>>
>>>> for (q = 0; q < LANDAU_MAX_Q_FACE; q++) col_scale[q] = 0.0; //
>>>> suppress warnings
>>>>
>>>> I get a similar error with an integer array.
>>>>
>>>> Any suggestions?
>>>>
>>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20210412/698b25a0/attachment.html>
More information about the petsc-dev
mailing list