[petsc-users] Removing unused warning during gnu compile

TAY wee-beng zonexo at gmail.com
Tue Dec 22 19:48:30 CST 2015


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