[petsc-dev] Reminder: *every* symbol with extern linkage *must* be namespaced

Barry Smith bsmith at mcs.anl.gov
Sat Mar 17 16:00:26 CDT 2012


  I have fixed the PetscDraw ones (resulted from bad use of regular expressions on Draw many years ago when first name-spaced).

   Note that Jed's tests (below) do not catch enum values and various other things that should also be fixed and will change the API.

   Barry

On Mar 17, 2012, at 1:16 PM, Jed Brown wrote:

> I have fixed the logging variables and a few others. The following incantation will show you a list of the symbols that are not currently in a "claimed" namespace (either directly or through bundling). These are arguably already too promiscuous, but the symbols that this does not filter out should probably be fixed.
> 
> $ nm --print-file-name mpich-static/lib/libpetsc.a |sort -k 3 | grep ' \(B\|D\|C\|T\) ' | grep -i -v ' \(XXT\|XYT\|Xi\|TetGen\|Vec\|Mat\|Petsc\|KSP\|PC\|SNES\|DM\|TS\|PF\|IS\|AO\|Characteristic\|ClassPerf\|EventPerfLog\|EventRegLog\|spbas_\|f90array\|mpifcmb\|SPARSEPACK\|MPIU_\|MINPACK\|admf_\)'
> 
> mpich-static/lib/libpetsc.a:dadestroy.c.o:0000000000000004 C ADDA_CLASSID
> mpich-static/lib/libpetsc.a:adda.c.o:000000000000264a T ADDAHCiter
> mpich-static/lib/libpetsc.a:adda.c.o:0000000000002584 T ADDAHCiterStartup
> mpich-static/lib/libpetsc.a:asa.c.o:0000000000000000 B asa_events_registered
> mpich-static/lib/libpetsc.a:sbaijfact2.c.o:0000000000014e15 T BackwardSolve_SeqSBAIJ_2_NaturalOrdering_private
> mpich-static/lib/libpetsc.a:sbaijfact2.c.o:0000000000012a64 T BackwardSolve_SeqSBAIJ_3_NaturalOrdering_private
> mpich-static/lib/libpetsc.a:sbaijfact2.c.o:000000000001021c T BackwardSolve_SeqSBAIJ_4_NaturalOrdering_private
> mpich-static/lib/libpetsc.a:sbaijfact2.c.o:000000000000d47e T BackwardSolve_SeqSBAIJ_5_NaturalOrdering_private
> mpich-static/lib/libpetsc.a:sbaijfact2.c.o:0000000000009e90 T BackwardSolve_SeqSBAIJ_6_NaturalOrdering_private
> mpich-static/lib/libpetsc.a:sbaijfact2.c.o:0000000000006082 T BackwardSolve_SeqSBAIJ_7_NaturalOrdering_private
> mpich-static/lib/libpetsc.a:sbaijfact2.c.o:00000000000021a5 T BackwardSolve_SeqSBAIJ_N_NaturalOrdering_private
> mpich-static/lib/libpetsc.a:sbstrmfact.c.o:0000000000001fe8 T BackwardSolve_SeqSBSTRM_4_NaturalOrdering_private
> mpich-static/lib/libpetsc.a:sbstrmfact.c.o:0000000000005262 T BackwardSolve_SeqSBSTRM_5_NaturalOrdering_private
> mpich-static/lib/libpetsc.a:iga.c.o:000000000000a2d6 T BDCreate
> mpich-static/lib/libpetsc.a:iga.c.o:000000000000a70a T BDDestroy
> mpich-static/lib/libpetsc.a:iga.c.o:000000000000acca T BDGetBasis
> mpich-static/lib/libpetsc.a:iga.c.o:000000000000b9aa T BDGetBasisOffset
> mpich-static/lib/libpetsc.a:iga.c.o:000000000000b60e T BDGetGaussPt
> mpich-static/lib/libpetsc.a:iga.c.o:000000000000b7dc T BDGetGaussWt
> mpich-static/lib/libpetsc.a:iga.c.o:000000000000aebb T BDSetBasis
> mpich-static/lib/libpetsc.a:iga.c.o:000000000000b442 T BDSetBasisOffset
> mpich-static/lib/libpetsc.a:iga.c.o:000000000000bb7a T BDSetElementOwnership
> mpich-static/lib/libpetsc.a:iga.c.o:000000000000b0aa T BDSetGaussPt
> mpich-static/lib/libpetsc.a:iga.c.o:000000000000b276 T BDSetGaussWt
> mpich-static/lib/libpetsc.a:baijfact.c.o:0000000000010c6e T BlockAbs_private
> mpich-static/lib/libpetsc.a:init.c.o:0000000000000009 D _BT_c
> mpich-static/lib/libpetsc.a:init.c.o:0000000000000020 B _BT_idx
> mpich-static/lib/libpetsc.a:init.c.o:0000000000000008 D _BT_mask
> mpich-static/lib/libpetsc.a:dl.c.o:0000000000000000 B CCAList
> mpich-static/lib/libpetsc.a:iga.c.o:000000000000f485 T CheckKnots
> mpich-static/lib/libpetsc.a:zsys.c.o:000000000000009b T chkmemfortran_
> mpich-static/lib/libpetsc.a:iga.c.o:000000000000be0e T Compute1DBasisFunctions
> mpich-static/lib/libpetsc.a:snesncg.c.o:0000000000001823 T ComputeYtJtF_Private
> mpich-static/lib/libpetsc.a:mpiaij.c.o:0000000000005958 T CreateColmap_MPIAIJ_Private
> mpich-static/lib/libpetsc.a:mpibaij.c.o:00000000000028f5 T CreateColmap_MPIBAIJ_Private
> mpich-static/lib/libpetsc.a:iga.c.o:000000000000ea19 T CreateKnotVector
> mpich-static/lib/libpetsc.a:iga.c.o:000000000000ef82 T CreateKnotVectorFromMesh
> mpich-static/lib/libpetsc.a:gamg.c.o:0000000000000926 T createLevel
> mpich-static/lib/libpetsc.a:iga.c.o:000000000000eca3 T CreatePeriodicKnotVector
> mpich-static/lib/libpetsc.a:tools.c.o:0000000000000629 T createSimpleGraph
> mpich-static/lib/libpetsc.a:iga.c.o:000000000000f1e2 T CreateTaperSetOfPoints
> mpich-static/lib/libpetsc.a:dgmres.c.o:0000000000001f14 T DGMREScycle
> mpich-static/lib/libpetsc.a:snesnoise.c.o:0000000000000a1a T DiffParameterCompute_More
> mpich-static/lib/libpetsc.a:snesnoise.c.o:00000000000000bb T DiffParameterCreate_More
> mpich-static/lib/libpetsc.a:snesnoise.c.o:0000000000000722 T DiffParameterDestroy_More
> mpich-static/lib/libpetsc.a:mmaij.c.o:00000000000022a5 T DisAssemble_MPIAIJ
> mpich-static/lib/libpetsc.a:mmbaij.c.o:00000000000020b3 T DisAssemble_MPIBAIJ
> mpich-static/lib/libpetsc.a:mmsbaij.c.o:0000000000004083 T DisAssemble_MPISBAIJ
> mpich-static/lib/libpetsc.a:reg.c.o:0000000000000000 B DLLibrariesLoaded
> mpich-static/lib/libpetsc.a:pthread.c.o:00000000000004c5 T DoCoreAffinity
> mpich-static/lib/libpetsc.a:axisc.c.o:0000000000000000 B DRAWAXIS_CLASSID
> mpich-static/lib/libpetsc.a:hists.c.o:0000000000000000 B DRAWHG_CLASSID
> mpich-static/lib/libpetsc.a:lgc.c.o:0000000000000000 B DRAWLG_CLASSID
> mpich-static/lib/libpetsc.a:dscatter.c.o:0000000000000000 B DRAWSP_CLASSID
> mpich-static/lib/libpetsc.a:eventLog.c.o:0000000000001891 T EventPerfInfoClear
> mpich-static/lib/libpetsc.a:eventLog.c.o:0000000000001aa2 T EventPerfInfoCopy
> mpich-static/lib/libpetsc.a:fas.c.o:0000000000008733 T FASCoarseCorrection
> mpich-static/lib/libpetsc.a:fas.c.o:0000000000008e88 T FASCycle_Additive
> mpich-static/lib/libpetsc.a:fas.c.o:0000000000009ae5 T FASCycle_Multiplicative
> mpich-static/lib/libpetsc.a:fas.c.o:0000000000006d6e T FASDownSmooth
> mpich-static/lib/libpetsc.a:fas.c.o:000000000000753a T FASUpSmooth
> mpich-static/lib/libpetsc.a:fgmres.c.o:0000000000000a9f T FGMREScycle
> mpich-static/lib/libpetsc.a:iga.c.o:000000000000c943 T FindSpan
> mpich-static/lib/libpetsc.a:agg.c.o:00000000000054c6 T formProl0
> mpich-static/lib/libpetsc.a:sbaijfact2.c.o:00000000000149c9 T ForwardSolve_SeqSBAIJ_2_NaturalOrdering_private
> mpich-static/lib/libpetsc.a:sbaijfact2.c.o:00000000000124d2 T ForwardSolve_SeqSBAIJ_3_NaturalOrdering_private
> mpich-static/lib/libpetsc.a:sbaijfact2.c.o:000000000000fb84 T ForwardSolve_SeqSBAIJ_4_NaturalOrdering_private
> mpich-static/lib/libpetsc.a:sbaijfact2.c.o:000000000000cb6d T ForwardSolve_SeqSBAIJ_5_NaturalOrdering_private
> mpich-static/lib/libpetsc.a:sbaijfact2.c.o:000000000000936d T ForwardSolve_SeqSBAIJ_6_NaturalOrdering_private
> mpich-static/lib/libpetsc.a:sbaijfact2.c.o:000000000000522a T ForwardSolve_SeqSBAIJ_7_NaturalOrdering_private
> mpich-static/lib/libpetsc.a:sbaijfact2.c.o:0000000000001c1d T ForwardSolve_SeqSBAIJ_N_NaturalOrdering_private
> mpich-static/lib/libpetsc.a:sbstrmfact.c.o:0000000000001973 T ForwardSolve_SeqSBSTRM_4_NaturalOrdering_private
> mpich-static/lib/libpetsc.a:sbstrmfact.c.o:00000000000049a3 T ForwardSolve_SeqSBSTRM_5_NaturalOrdering_private
> mpich-static/lib/libpetsc.a:pthread.c.o:0000000000000232 T FuncFinish
> mpich-static/lib/libpetsc.a:lockfree.c.o:0000000000000232 T FuncFinish_LockFree
> mpich-static/lib/libpetsc.a:gamg.c.o:0000000000000050 C gamg_setup_events
> mpich-static/lib/libpetsc.a:geo.c.o:0000000000000629 T geo_mg_compare
> mpich-static/lib/libpetsc.a:tools.c.o:00000000000028fe T getDataWithGhosts
> mpich-static/lib/libpetsc.a:iga.c.o:000000000000c9d8 T GetDersBasisFuns
> mpich-static/lib/libpetsc.a:geo.c.o:00000000000012f0 T getGIDsOnSquareGraph
> mpich-static/lib/libpetsc.a:pinit.c.o:0000000000000000 B __gierr
> mpich-static/lib/libpetsc.a:state.c.o:0000000000000000 B globalcurrentstate
> mpich-static/lib/libpetsc.a:state.c.o:0000000000000000 D globalmaxstate
> mpich-static/lib/libpetsc.a:gmres.c.o:0000000000001196 T GMREScycle
> mpich-static/lib/libpetsc.a:xcolor.c.o:0000000000000000 B gNumcolors
> mpich-static/lib/libpetsc.a:characteristic.c.o:000000000000a020 T HeapSort
> mpich-static/lib/libpetsc.a:hem.c.o:0000000000000cd4 T heavyEdgeMatchAgg
> mpich-static/lib/libpetsc.a:hem.c.o:0000000000000c74 T hem_compare
> mpich-static/lib/libpetsc.a:complex.c.o:000000000002fecf T indicesPointFields_private
> mpich-static/lib/libpetsc.a:complex.c.o:000000000002fa7d T indicesPoint_private
> mpich-static/lib/libpetsc.a:pthreadpool_chain.c.o:0000000000000040 C job_chain
> mpich-static/lib/libpetsc.a:lockfree.c.o:0000000000000000 B job_lockfree
> mpich-static/lib/libpetsc.a:pthreadpool_main.c.o:0000000000000030 C job_main
> mpich-static/lib/libpetsc.a:nopool.c.o:0000000000000020 C job_none
> mpich-static/lib/libpetsc.a:pthreadpool_tree.c.o:0000000000000040 C job_tree
> mpich-static/lib/libpetsc.a:pthreadpool_true.c.o:0000000000000000 B job_true
> mpich-static/lib/libpetsc.a:dgefa2.c.o:00000000000015c3 T Kernel_A_gets_inverse_A_15
> mpich-static/lib/libpetsc.a:dgefa2.c.o:0000000000000045 T Kernel_A_gets_inverse_A_2
> mpich-static/lib/libpetsc.a:dgefa3.c.o:0000000000000045 T Kernel_A_gets_inverse_A_3
> mpich-static/lib/libpetsc.a:dgefa4.c.o:0000000000000045 T Kernel_A_gets_inverse_A_4
> mpich-static/lib/libpetsc.a:dgefa5.c.o:0000000000000045 T Kernel_A_gets_inverse_A_5
> mpich-static/lib/libpetsc.a:dgefa6.c.o:0000000000000045 T Kernel_A_gets_inverse_A_6
> mpich-static/lib/libpetsc.a:dgefa7.c.o:0000000000000045 T Kernel_A_gets_inverse_A_7
> mpich-static/lib/libpetsc.a:dgefa2.c.o:00000000000009ed T Kernel_A_gets_inverse_A_9
> mpich-static/lib/libpetsc.a:vecpthread.c.o:0000000000000008 C kerneldatap
> mpich-static/lib/libpetsc.a:qn.c.o:0000000000000076 T LBGFSApplyJinv_Private
> mpich-static/lib/libpetsc.a:lgmres.c.o:0000000000000e1a T LGMREScycle
> mpich-static/lib/libpetsc.a:dgedi.c.o:0000000000000000 T LINPACKdgedi
> mpich-static/lib/libpetsc.a:dgefa.c.o:0000000000000045 T LINPACKdgefa
> mpich-static/lib/libpetsc.a:hem.c.o:0000000000000b86 T LLNAddDestroy
> mpich-static/lib/libpetsc.a:hem.c.o:0000000000000aef T LLNAddID
> mpich-static/lib/libpetsc.a:hem.c.o:0000000000000ade T LLNGetID
> mpich-static/lib/libpetsc.a:hem.c.o:0000000000000ac2 T LLNSetID
> mpich-static/lib/libpetsc.a:pthread.c.o:0000000000000010 B MainThreadCoreAffinity
> mpich-static/lib/libpetsc.a:mis.c.o:000000000000069f T maxIndSetAgg
> mpich-static/lib/libpetsc.a:dlregismat.c.o:00000000000001e0 D MPChacoEigenTypes
> mpich-static/lib/libpetsc.a:dlregismat.c.o:0000000000000140 D MPChacoGlobalTypes
> mpich-static/lib/libpetsc.a:dlregismat.c.o:00000000000001a0 D MPChacoLocalTypes
> mpich-static/lib/libpetsc.a:mcrl.c.o:000000000000052b T MPIAIJCRL_create_aijcrl
> mpich-static/lib/libpetsc.a:mpimatmatmult.c.o:00000000000052ff T MPIAIJ_MPIDenseDestroy
> mpich-static/lib/libpetsc.a:mpibstream.c.o:0000000000000076 T MPIBSTRM_create_bstrm
> mpich-static/lib/libpetsc.a:mpilong.c.o:000000000000038f T MPILong_Recv
> mpich-static/lib/libpetsc.a:mpilong.c.o:0000000000000054 T MPILong_Send
> mpich-static/lib/libpetsc.a:mpisbstream.c.o:0000000000000076 T MPISBSTRM_create_sbstrm
> mpich-static/lib/libpetsc.a:dlregismat.c.o:0000000000000100 D MPPTScotchStrategyTypes
> mpich-static/lib/libpetsc.a:dlregisvec.c.o:000000000000001c C NormIds
> mpich-static/lib/libpetsc.a:dlregisvec.c.o:0000000000000000 D NormTypes
> mpich-static/lib/libpetsc.a:hem.c.o:000000000000069f T NPCreate
> mpich-static/lib/libpetsc.a:hem.c.o:00000000000008ff T NPDestroy
> mpich-static/lib/libpetsc.a:hem.c.o:0000000000000798 T NPGetNewNode
> mpich-static/lib/libpetsc.a:pthreadpool_true.c.o:0000000000000020 C pbarr
> mpich-static/lib/libpetsc.a:vecpthread.c.o:0000000000000008 C pdata
> mpich-static/lib/libpetsc.a:plog.c.o:00000000000000b8 B _PetscLogPHC
> mpich-static/lib/libpetsc.a:plog.c.o:00000000000000c0 B _PetscLogPHD
> mpich-static/lib/libpetsc.a:plog.c.o:00000000000000c8 B _PetscLogPLB
> mpich-static/lib/libpetsc.a:plog.c.o:00000000000000d0 B _PetscLogPLE
> mpich-static/lib/libpetsc.a:ctetgen.c.o:0000000000005034 T PLCCreate
> mpich-static/lib/libpetsc.a:ctetgen.c.o:00000000000054e0 T PLCDestroy
> mpich-static/lib/libpetsc.a:asa.c.o:00000000000019af T PrintEnergyNormOfDiff
> mpich-static/lib/libpetsc.a:asa.c.o:000000000000151d T PrintResNorm
> mpich-static/lib/libpetsc.a:pthreadpool_chain.c.o:0000000000000008 C pVal_chain
> mpich-static/lib/libpetsc.a:lockfree.c.o:0000000000000008 C pVal_lockfree
> mpich-static/lib/libpetsc.a:nopool.c.o:0000000000000008 C pVal_none
> mpich-static/lib/libpetsc.a:pthreadpool_true.c.o:0000000000000008 C pVal_true
> mpich-static/lib/libpetsc.a:pthread.c.o:0000000000000004 C rankkey
> mpich-static/lib/libpetsc.a:tools.c.o:0000000000001415 T scaleFilterGraph
> mpich-static/lib/libpetsc.a:crl.c.o:0000000000000b38 T SeqAIJCRL_create_aijcrl
> mpich-static/lib/libpetsc.a:csrperm.c.o:0000000000001ea1 T SeqAIJPERM_create_perm
> mpich-static/lib/libpetsc.a:bstream.c.o:0000000000000d54 T SeqBSTRM_convert_bstrm
> mpich-static/lib/libpetsc.a:bstream.c.o:000000000000a901 T SeqBSTRM_create_bstrm
> mpich-static/lib/libpetsc.a:sbstrmfact.c.o:00000000000069fb T SeqSBSTRM_convertFact_sbstrm
> mpich-static/lib/libpetsc.a:sbstream.c.o:0000000000000ad4 T SeqSBSTRM_convert_sbstrm
> mpich-static/lib/libpetsc.a:sbstream.c.o:0000000000006085 T SeqSBSTRM_create_sbstrm
> mpich-static/lib/libpetsc.a:iga.c.o:000000000000daf6 T SetupGauss1D
> mpich-static/lib/libpetsc.a:characteristic.c.o:000000000000a284 T SiftDown
> mpich-static/lib/libpetsc.a:agg.c.o:0000000000002989 T smoothAggs
> mpich-static/lib/libpetsc.a:stashij.c.o:0000000000006aa9 T StashMPIIJAssemble_Private
> mpich-static/lib/libpetsc.a:stashij.c.o:0000000000005162 T StashMPIIJClear_Private
> mpich-static/lib/libpetsc.a:stashij.c.o:0000000000004a6b T StashMPIIJCreate_Private
> mpich-static/lib/libpetsc.a:stashij.c.o:0000000000004df7 T StashMPIIJDestroy_Private
> mpich-static/lib/libpetsc.a:stashij.c.o:0000000000005aa9 T StashMPIIJExtend_Private
> mpich-static/lib/libpetsc.a:stashij.c.o:0000000000006144 T StashMPIIJGetIndicesMerged_Private
> mpich-static/lib/libpetsc.a:stashij.c.o:0000000000005e6e T StashMPIIJGetIndices_Private
> mpich-static/lib/libpetsc.a:stashij.c.o:0000000000005632 T StashMPIIJGetMultivalued_Private
> mpich-static/lib/libpetsc.a:stashij.c.o:000000000000583c T StashMPIIJSetMultivalued_Private
> mpich-static/lib/libpetsc.a:stashij.c.o:00000000000053c2 T StashMPIIJSetPreallocation_Private
> mpich-static/lib/libpetsc.a:stashij.c.o:0000000000004294 T StashSeqIJClear_Private
> mpich-static/lib/libpetsc.a:stashij.c.o:0000000000003152 T StashSeqIJCreate_Private
> mpich-static/lib/libpetsc.a:stashij.c.o:000000000000449d T StashSeqIJDestroy_Private
> mpich-static/lib/libpetsc.a:stashij.c.o:0000000000003801 T StashSeqIJExtend_Private
> mpich-static/lib/libpetsc.a:stashij.c.o:0000000000003a67 T StashSeqIJGetIndices_Private
> mpich-static/lib/libpetsc.a:stashij.c.o:00000000000033fc T StashSeqIJGetMultivalued_Private
> mpich-static/lib/libpetsc.a:stashij.c.o:00000000000035a7 T StashSeqIJSetMultivalued_Private
> mpich-static/lib/libpetsc.a:stashij.c.o:00000000000047a7 T StashSeqIJSetPreallocation_Private
> mpich-static/lib/libpetsc.a:init.c.o:0000000000000024 B synchronizeCUSP
> mpich-static/lib/libpetsc.a:pthread.c.o:0000000000000008 B ThreadCoreAffinity
> mpich-static/lib/libpetsc.a:pthread.c.o:0000000000000018 B threadranks
> mpich-static/lib/libpetsc.a:geo.c.o:0000000000001292 T triangulateAndFormProl
> mpich-static/lib/libpetsc.a:tv_data_display.c.o:0000000000000000 T TV_add_row
> mpich-static/lib/libpetsc.a:tv_data_display.c.o:0000000000100000 C TV_data_format_buffer
> mpich-static/lib/libpetsc.a:tv_data_display.c.o:0000000000000000 B TV_data_format_control
> mpich-static/lib/libpetsc.a:tv_data_display.c.o:0000000000000130 T TV_post_display_callback
> mpich-static/lib/libpetsc.a:tv_data_display.c.o:0000000000000120 T TV_pre_display_callback
> mpich-static/lib/libpetsc.a:complex.c.o:000000000002dd41 T updatePointFields_private
> mpich-static/lib/libpetsc.a:complex.c.o:000000000002d8c6 T updatePoint_private
> 




More information about the petsc-dev mailing list