Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation - warnings #5

Closed
lukaspospisil opened this issue Mar 2, 2017 · 7 comments
Closed

Compilation - warnings #5

lukaspospisil opened this issue Mar 2, 2017 · 7 comments

Comments

@lukaspospisil
Copy link

Hi guys,

new warnings during compilation:

permon/src/mat/impls/inv/matinv.c: In function ‘MatInvExplicitly_Inv’:

permon/src/qps/impls/mpgp/mpgp.c:557:14: warning: ‘alpha’ may be used uninitialized in this function [-Wmaybe-uninitialized]
         TRY( QPGetScaledProjectedGradient(qp,alpha,galpha) );
permon/src/qps/impls/mpgp/mpgp.c: In function ‘QPSSolve_MPGP’:

permon/src/qps/impls/mpgp/mpgp.c:557:14: warning: ‘alpha’ may be used uninitialized in this function [-Wmaybe-uninitialized]
         TRY( QPGetScaledProjectedGradient(qp,alpha,galpha) );
permon/src/qps/impls/smalxe/smalxe.c: In function ‘QPSSMALXEUpdate_SMALXE’:

petsc-3.7.0/include/petsclog.h:40:46: warning: ‘rho_update’ may be used uninitialized in this function [-Wmaybe-uninitialized]
 #define PetscInfo2(A,S,a1,a2)                PetscInfo_Private(PETSC_FUNCTION_NAME,A,S,a1,a2)

permon/src/qps/impls/smalxe/smalxe.c:387:17: note: ‘rho_update’ was declared here
   PetscReal     rho_update;

Regards, LP

@haplav
Copy link
Collaborator

haplav commented Mar 7, 2017

Hi Lukas,
I've tried to fix this by f2edfbc and 1cfd00e. Could you please check your warnings disappear?
Thank you!
Vaclav

@lukaspospisil
Copy link
Author

Hi Vaclav,
yes - the previous warnings are gone. However, there are new ones:

permon/src/mat/impls/inv/matinv.c: In function ‘MatInvExplicitly_Inv’:
permon/src/mat/impls/inv/matinv.c:622:28: warning: ‘scColor’ may be used uninitialized in this function [-Wmaybe-uninitialized]
         iloihi[0] = scColor*floor(M/redundancy);
permon/src/qps/impls/mpgp/mpgp.c: In function ‘QPSSolve_MPGP’:
permon/src/qps/impls/mpgp/mpgp.c:645:10: warning: ‘alpha’ may be used uninitialized in this function [-Wmaybe-uninitialized]
     TRY( QPGetScaledProjectedGradient(qp,alpha,galpha) );

@haplav
Copy link
Collaborator

haplav commented Mar 9, 2017 via email

@haplav
Copy link
Collaborator

haplav commented Mar 10, 2017

Sorry, that was my fault. I have now pushed a19a9f9 and 86dd7fa which should fix the warnings. Note that I don't see why the compiler complained in the first case...

@lukaspospisil
Copy link
Author

Thank you, I will check warnings as soon as possible.

@lukaspospisil
Copy link
Author

Great work! Without any warning (also on Piz Daint supercomputer with Petsc-cuda compilation).

@haplav
Copy link
Collaborator

haplav commented Mar 13, 2017

Thank you for cooperation.
Best,
Vaclav

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants