[petsc-users] Removing unused warning during gnu compile

TAY wee-beng zonexo at gmail.com
Wed Dec 23 20:45:17 CST 2015


Hi Barry,

I got more but I only show some. Or is it because I use petsc.h instead 
of the individual *.h?

Thank you

Yours sincerely,

TAY wee-beng

On 23/12/2015 12:33 PM, Barry Smith wrote:
>   Are the warning messages below the only ones you get or do you get many more?
>
>    Barry
>
>> On Dec 22, 2015, at 7:48 PM, TAY wee-beng <zonexo at gmail.com> wrote:
>>
>> Hi,
>>
>> When I compile using gfortran, I need it to warn me of any unused parameter in my code. However, I found that it also warns of unused parameter in PETSc code, as shown below. How can I let it only display warning for my own code, instead of PETSc? Thanks.
>>
>> wtay/Lib/petsc-3.6.2_shared_gnu_debug/include/petsc/finclude/petscsnes.h:116.54:
>>     Included at /home/wtay/Lib/petsc-3.6.2_shared_gnu_debug/include/petsc/finclude/petsc.h:15:
>>     Included at fractional_initial.F90:28:
>>
>>       integer(kind=selected_int_kind(5)) SNES_QN_LBFGS
>>                                                       1
>> Warning: Unused parameter 'snes_qn_lbfgs' declared at (1)
>> /home/wtay/Lib/petsc-3.6.2_shared_gnu_debug/include/petsc/finclude/petscsnes.h:144.64:
>>     Included at /home/wtay/Lib/petsc-3.6.2_shared_gnu_debug/include/petsc/finclude/petsc.h:15:
>>     Included at fractional_initial.F90:28:
>>
>>       integer(kind=selected_int_kind(5)) SNES_QN_RESTART_DEFAULT
>>                                                                 1
>> Warning: Unused parameter 'snes_qn_restart_default' declared at (1)
>> /home/wtay/Lib/petsc-3.6.2_shared_gnu_debug/include/petsc/finclude/petscsnes.h:145.61:
>>     Included at /home/wtay/Lib/petsc-3.6.2_shared_gnu_debug/include/petsc/finclude/petsc.h:15:
>>     Included at fractional_initial.F90:28:
>>
>>       integer(kind=selected_int_kind(5)) SNES_QN_RESTART_NONE
>>                                                              1
>> Warning: Unused parameter 'snes_qn_restart_none' declared at (1)
>> /home/wtay/Lib/petsc-3.6.2_shared_gnu_debug/include/petsc/finclude/petscsnes.h:147.65:
>>     Included at /home/wtay/Lib/petsc-3.6.2_shared_gnu_debug/include/petsc/finclude/petsc.h:15:
>>     Included at fractional_initial.F90:28:
>>
>>       integer(kind=selected_int_kind(5)) SNES_QN_RESTART_PERIODIC
>>                                                                  1
>>
>> -- 
>> Thank you
>>
>> Yours sincerely,
>>
>> TAY wee-beng
>>



More information about the petsc-users mailing list