[petsc-dev] So PETSc's function names are restricted to 31 characters?

Jed Brown jed at jedbrown.org
Fri Sep 22 22:08:37 CDT 2017


C11 §5.2.4.1 Translation limits

  * 63 significant initial characters in an internal identifier or a
  macro name (each universal character name or extended source character
  is considered a single character)

  * 31 significant initial characters in an external identifier (each
  universal character name specifying a short identifier of 0000FFFF or
  less is considered 6 characters, each universal character name
  specifying a short identifier of 00010000 or more is considered 10
  characters, and each extended source character is considered the same
  number of characters as the corresponding universal character name, if
  any) 19

  * 4095 external identifiers in one translation unit

  * 15 nesting levels for #included files

  [elided lots of other limits that probably aren't a risk to us]


C99 has the same limits.  C90 says 6 significant initial characters for
an external symbol and 31 for an internal symbol -- clearly nobody
follows that.

Barry Smith <bsmith at mcs.anl.gov> writes:

>   I don't think Fortran was the problematic language.
>
>> On Sep 22, 2017, at 8:43 PM, Richard Tran Mills <rtmills at anl.gov> wrote:
>> 
>> I've never encountered a recent Fortran compiler that doesn't allow maximum identifier length to exceed the 31 characters specified in Fortran 95. Since Fortran 2003 extended this to 63, I vote for that.
>> 
>> --Richard
>> 
>> On Fri, Sep 22, 2017 at 6:36 PM, Smith, Barry F. <bsmith at mcs.anl.gov> wrote:
>> 
>>   Since these don't seem to cause problems maybe we can change the maximum allowed to 63?
>> 
>> > On Sep 22, 2017, at 8:01 PM, Lisandro Dalcin <dalcinl at gmail.com> wrote:
>> >
>> > 32 CharacteristicPackageInitialized
>> > 32 CharacteristicSendCoordinatesEnd
>> > 32 DMForestGetBaseCoordinateMapping
>> > 32 DMForestSetBaseCoordinateMapping
>> > 32 DMGlobalToLocalBeginDefaultShell
>> > 32 DMLocalToGlobalBeginDefaultShell
>> > 32 DMNetworkAssembleGraphStructures
>> > 32 DMNetworkGetVariableGlobalOffset
>> > 32 DMPlexComputeInterpolatorGeneral
>> > 32 DMPlexCreateDefaultReferenceTree
>> > 32 DMPlexCreateFromCellListParallel
>> > 32 DMShellSetLocalToLocalVecScatter
>> > 32 DMSwarmRegisterUserDatatypeField
>> > 32 ISGlobalToLocalMappingApplyBlock
>> > 32 ISLocalToGlobalMappingApplyBlock
>> > 32 ISLocalToGlobalMappingGetIndices
>> > 32 MatCreateMPIAIJSumSeqAIJSymbolic
>> > 32 MatCreateMPIMatConcatenateSeqMat
>> > 32 MatFDColoringGetPerturbedColumns
>> > 32 MatMPIAIJDiagonalScaleLocalSetUp
>> > 32 MatPartitioningRegisterAllCalled
>> > 32 MatSchurComplementGetSubMatrices
>> > 32 MatSchurComplementSetSubMatrices
>> > 32 PCBDDCApplyNullSpaceCorrectionPC
>> > 32 PCGAMGClassicalInitializePackage
>> > 32 PCGASMCreateStraddlingSubdomains
>> > 32 PCNNApplyInterfacePreconditioner
>> > 32 PetscDrawXiQuickWindowFromWindow
>> > 32 PetscDSGetJacobianPreconditioner
>> > 32 PetscDSHasJacobianPreconditioner
>> > 32 PetscDSSetJacobianPreconditioner
>> > 32 PetscDualSpaceSimpleSetDimension
>> > 32 PetscErrorPrintfInitializeCalled
>> > 32 PetscEventPerfLogDeactivateClass
>> > 32 PetscFEGetFaceCentroidTabulation
>> > 32 PetscObjectInheritPrintedOptions
>> > 32 PetscOptionsHelpPrintedSingleton
>> > 32 PetscSectionCreateSubmeshSection
>> > 32 PetscSectionGetConstraintIndices
>> > 32 PetscSectionSetConstraintIndices
>> > 32 PetscSpacePolynomialGetSymmetric
>> > 32 PetscSpacePolynomialSetSymmetric
>> > 32 PetscViewerASCIIPushSynchronized
>> > 32 PetscViewerBinaryReadStringArray
>> > 32 PetscViewerFlowControlStepMaster
>> > 32 PetscViewerFlowControlStepWorker
>> > 32 SNESSetComputeApplicationContext
>> > 32 SNESSetLagPreconditionerPersists
>> > 32 TaoGetCurrentFunctionEvaluations
>> > 32 TaoGetMaximumFunctionEvaluations
>> > 32 TaoIsObjectiveAndGradientDefined
>> > 32 TaoLineSearchAppendOptionsPrefix
>> > 32 TaoLineSearchSetObjectiveRoutine
>> > 32 TaoSetEqualityConstraintsRoutine
>> > 32 TaoSetMaximumFunctionEvaluations
>> > 32 TSPseudoIncrementDtFromInitialDt
>> > 33 DMPlexCreateSectionBCIndicesField
>> > 33 DMPlexInsertBoundaryValuesRiemann
>> > 33 DMPlexMatGetClosureIndicesRefined
>> > 33 DMShellSetGlobalToLocalVecScatter
>> > 33 DMShellSetLocalToGlobalVecScatter
>> > 33 DMSwarmCreateLocalVectorFromField
>> > 33 DMSwarmRegisterPetscDatatypeField
>> > 33 ISLocalToGlobalMappingConcatenate
>> > 33 ISLocalToGlobalMappingRegisterAll
>> > 33 ISLocalToGlobalMappingRestoreInfo
>> > 33 KSPMonitorDynamicToleranceDestroy
>> > 33 MatFactorFactorizeSchurComplement
>> > 33 MatMPIAdjCreateNonemptySubcommMat
>> > 33 MatMPIBAIJDiagonalScaleLocalSetUp
>> > 33 MatPartitioningParmetisGetEdgeCut
>> > 33 MatSeqBAIJSetNumericFactorization
>> > 33 ourtaoobjectiveandgradientroutine
>> > 33 PCBDDCGetDirichletBoundariesLocal
>> > 33 PCBDDCNullSpaceAssembleCorrection
>> > 33 PCBDDCSetDirichletBoundariesLocal
>> > 33 PCBDDCSolveSubstructureCorrection
>> > 33 PCFactorReorderForNonzeroDiagonal
>> > 33 PCGAMGClassicalPackageInitialized
>> > 33 PCGASMSetHierarchicalPartitioning
>> > 33 PetscDualSpaceCreateReferenceCell
>> > 33 PetscDualSpaceSimpleSetFunctional
>> > 33 PetscGridHashGetEnclosingBoxQuery
>> > 33 PetscObjectDestroyOptionsHandlers
>> > 33 PetscObjectProcessOptionsHandlers
>> > 33 PetscPartitionerRegisterAllCalled
>> > 33 PetscPartitionerShellSetPartition
>> > 33 PetscSectionAddFieldConstraintDof
>> > 33 PetscSectionGetClosurePermutation
>> > 33 PetscSectionGetFieldConstraintDof
>> > 33 PetscSectionRestoreFieldPointSyms
>> > 33 PetscSectionSetClosurePermutation
>> > 33 PetscSectionSetFieldConstraintDof
>> > 33 PetscViewerBinaryWriteStringArray
>> > 33 SNESLineSearchAppendOptionsPrefix
>> > 33 TaoLineSearchGetFullStepObjective
>> > 33 TaoLineSearchSetInitialStepLength
>> > 33 TaoSetObjectiveAndGradientRoutine
>> > 33 TSMonitorLGCtxSetDisplayVariables
>> > 34 CharacteristicSendCoordinatesBegin
>> > 34 DMCompositeRestoreLocalAccessArray
>> > 34 DMPlexComputeCellGeometryAffineFEM
>> > 34 DMPlexComputeInjectorReferenceTree
>> > 34 DMPlexSNESComputeJacobianActionFEM
>> > 34 DMShellSetCreateFieldDecomposition
>> > 34 DMSwarmCreateGlobalVectorFromField
>> > 34 DMSwarmDestroyLocalVectorFromField
>> > 34 DMSwarmSetPointsUniformCoordinates
>> > 34 ISLocalToGlobalMappingGetBlockInfo
>> > 34 ISLocalToGlobalMappingGetBlockSize
>> > 34 ISLocalToGlobalMappingSetBlockSize
>> > 34 KSPMonitorLGTrueResidualNormCreate
>> > 34 KSPMonitorSNESLGResidualNormCreate
>> > 34 MatPartitioningSetPartitionWeights
>> > 34 PCBDDCApplyInterfacePreconditioner
>> > 34 PCBDDCDestroyNullSpaceCorrectionPC
>> > 34 PCBDDCDetectDisconnectedComponents
>> > 34 PCBDDCMatISGetSubassemblingPattern
>> > 34 PetscObjectComposedDataIncreaseInt
>> > 34 PetscObjectsListGetGlobalNumbering
>> > 34 PetscPrintXMLNestedLinePerfResults
>> > 34 PetscViewerASCIISynchronizedPrintf
>> > 34 SNESGetAlwaysComputesFinalResidual
>> > 34 SNESSetAlwaysComputesFinalResidual
>> > 34 SNESVIComputeMeritFunctionGradient
>> > 34 TaoSetInequalityConstraintsRoutine
>> > 34 VecTaggerCDFIterativeGetTolerances
>> > 34 VecTaggerCDFIterativeSetTolerances
>> > 35 CharacteristicSetFieldInterpolation
>> > 35 DMCreateDomainDecompositionScatters
>> > 35 DMDAGetPreallocationCenterDimension
>> > 35 DMDASetPreallocationCenterDimension
>> > 35 DMPlexInsertBoundaryValuesEssential
>> > 35 DMPlexReferenceTreeGetChildSymmetry
>> > 35 DMShellSetCreateDomainDecomposition
>> > 35 DMSwarmDestroyGlobalVectorFromField
>> > 35 DMSwarmSortGetNumberOfPointsPerCell
>> > 35 KSPMonitorSNESLGResidualNormDestroy
>> > 35 MatDenseOrthogonalRangeOrComplement
>> > 35 MatSchurComplementUpdateSubMatrices
>> > 35 PCGAMGSetUseParallelCoarseGridSolve
>> > 35 PetscDualSpaceLagrangeGetContinuity
>> > 35 PetscDualSpaceLagrangeSetContinuity
>> > 35 PetscObjectComposedDataIncreaseReal
>> > 35 PetscObjectPrintClassNamePrefixType
>> > 35 PetscSpacePolynomialGetNumVariables
>> > 35 PetscSpacePolynomialSetNumVariables
>> > 35 PetscViewerBinaryGetMPIIODescriptor
>> > 35 SNESDefaultMatrixFreeSetParameters2
>> > 35 SNESLineSearchMonitorSetFromOptions
>> > 35 SNESLineSearchMonitorSolutionUpdate
>> > 35 TaoLineSearchComputeObjectiveAndGTS
>> > 36 ISLocalToGlobalMappingRestoreIndices
>> > 36 ISLocalToGlobalMappingSetFromOptions
>> > 36 MatColoringCreateLargestFirstWeights
>> > 36 MatColoringCreateSmallestLastWeights
>> > 36 PetscDSGetComponentDerivativeOffsets
>> > 36 PetscLayoutSetISLocalToGlobalMapping
>> > 36 PetscSectionCreateGlobalSectionLabel
>> > 36 SNESVIComputeBsubdifferentialVectors
>> > 37 DMCompositeGetISLocalToGlobalMappings
>> > 37 ISLocalToGlobalMappingGetBlockIndices
>> > 37 MatPartitioningParmetisSetRepartition
>> > 37 PCBDDCGraphComputeConnectedComponents
>> > 37 PetscObjectComposedDataIncreaseScalar
>> > 37 PetscPrintXMLGlobalPerformanceElement
>> > 37 PetscSectionGetConstrainedStorageSize
>> > 37 PetscSectionGetFieldConstraintIndices
>> > 37 PetscSectionSetFieldConstraintIndices
>> > 37 SNESObjectiveComputeFunctionDefaultFD
>> > 38 CharacteristicSetVelocityInterpolation
>> > 38 DMPlexCreateSpectralClosurePermutation
>> > 38 DMPlexReferenceTreeGetChildrenMatrices
>> > 38 ISLocalToGlobalMappingRestoreBlockInfo
>> > 38 MatFactorSolveSchurComplementTranspose
>> > 38 MatMPIAIJSetUseScalableIncreaseOverlap
>> > 38 ourtaolinesearchobjectiveandgtsroutine
>> > 38 PetscObjectComposedDataIncreaseIntstar
>> > 38 PetscObjectCopyFortranFunctionPointers
>> > 38 TaoLineSearchSetObjectiveAndGTSRoutine
>> > 39 ISLocalToGlobalMappingRegisterAllCalled
>> > 39 MatPartitioningHierarchicalGetFineparts
>> > 39 PCTelescopeGetIgnoreKSPComputeOperators
>> > 39 PCTelescopeSetIgnoreKSPComputeOperators
>> > 39 PetscObjectComposedDataIncreaseRealstar
>> > 39 PetscSectionCreateGlobalSectionCensored
>> > 40 CharacteristicSetFieldInterpolationLocal
>> > 40 DMPlexInsertBoundaryValuesEssentialField
>> > 40 LCLComputeAugmentedLagrangianAndGradient
>> > 40 MatPartitioningHierarchicalSetNfineparts
>> > 40 PetscSectionGetClosureInversePermutation
>> > 40 TaoLineSearchComputeObjectiveAndGradient
>> > 41 ISLocalToGlobalMappingRestoreBlockIndices
>> > 41 MatPartitioningHierarchicalGetCoarseparts
>> > 41 MatSchurComplementComputeExplicitOperator
>> > 41 PetscObjectComposedDataIncreaseScalarstar
>> > 41 TaoLineSearchGetNumberFunctionEvaluations
>> > 42 DMPlexReferenceTreeRestoreChildrenMatrices
>> > 42 MatPartitioningHierarchicalSetNcoarseparts
>> > 42 MatPartitioningParmetisSetCoarseSequential
>> > 42 PCBDDCGraphComputeConnectedComponentsLocal
>> > 43 CharacteristicSetVelocityInterpolationLocal
>> > 43 DMShellSetCreateDomainDecompositionScatters
>> > 43 ourtaolinesearchobjectiveandgradientroutine
>> > 43 TaoLineSearchSetObjectiveAndGradientRoutine
>> > 44 KSPGMRESModifiedGramSchmidtOrthogonalization
>> > 45 KSPGMRESClassicalGramSchmidtOrthogonalization
>> >
>> >
>> > --
>> > Lisandro Dalcin
>> > ============
>> > Research Scientist
>> > Computer, Electrical and Mathematical Sciences & Engineering (CEMSE)
>> > Extreme Computing Research Center (ECRC)
>> > King Abdullah University of Science and Technology (KAUST)
>> > http://ecrc.kaust.edu.sa/
>> >
>> > 4700 King Abdullah University of Science and Technology
>> > al-Khawarizmi Bldg (Bldg 1), Office # 0109
>> > Thuwal 23955-6900, Kingdom of Saudi Arabia
>> > http://www.kaust.edu.sa
>> >
>> > Office Phone: +966 12 808-0459
>> 
>> 


More information about the petsc-dev mailing list