3.1-READEX_BETA (revision 13238M)
SCOREP_SubstratePlugins.h
Go to the documentation of this file.
1 /*
2  * This file is part of the Score-P software (http://www.score-p.org)
3  *
4  * Copyright (c) 2009-2013,
5  * RWTH Aachen University, Germany
6  *
7  * Copyright (c) 2009-2013,
8  * Gesellschaft fuer numerische Simulation mbH Braunschweig, Germany
9  *
10  * Copyright (c) 2009-2013, 2015-2016,
11  * Technische Universitaet Dresden, Germany
12  *
13  * Copyright (c) 2009-2013,
14  * University of Oregon, Eugene, USA
15  *
16  * Copyright (c) 2009-2013,
17  * Forschungszentrum Juelich GmbH, Germany
18  *
19  * Copyright (c) 2009-2013,
20  * German Research School for Simulation Sciences GmbH, Juelich/Aachen, Germany
21  *
22  * Copyright (c) 2009-2013,
23  * Technische Universitaet Muenchen, Germany
24  *
25  * This software may be modified and distributed under the terms of
26  * a BSD-style license. See the COPYING file in the package base
27  * directory for details.
28  *
29  */
30 
38 #ifndef SCOREP_SUBSTRATE_PLUGINS_H
39 #define SCOREP_SUBSTRATE_PLUGINS_H
40 
135 #include <stdlib.h>
136 #include <stddef.h>
137 
141 
142 
144 #define SCOREP_SUBSTRATE_PLUGIN_VERSION 1
145 
147 #define SCOREP_SUBSTRATE_PLUGIN_UNDEFINED_MANAGEMENT_FUNCTIONS 100
148 
149 
150 #ifdef __cplusplus
151 # define EXTERN extern "C"
152 #else
153 # define EXTERN extern
154 #endif
155 
157 #define SCOREP_SUBSTRATE_PLUGIN_ENTRY( _name ) \
158  EXTERN SCOREP_SubstratePluginInfo \
159  SCOREP_SubstratePlugin_ ## _name ## _get_info( void )
160 
168 {
177  const char* ( *SCOREP_GetExperimentDirName )( void );
178 
185  int
186  ( * SCOREP_Ipc_GetSize )( void );
187 
188 
195  int
196  ( * SCOREP_Ipc_GetRank )( void );
197 
210  int
211  ( * SCOREP_Ipc_Send )( const void* buf,
212  int count,
213  SCOREP_Ipc_Datatype datatype,
214  int dest );
215 
216 
229  int
230  ( * SCOREP_Ipc_Recv )( void* buf,
231  int count,
232  SCOREP_Ipc_Datatype datatype,
233  int source );
234 
235 
243  int
244  ( * SCOREP_Ipc_Barrier )( void );
245 
246 
258  int
259  ( * SCOREP_Ipc_Bcast )( void* buf,
260  int count,
261  SCOREP_Ipc_Datatype datatype,
262  int root );
263 
281  int
282  ( * SCOREP_Ipc_Gather )( const void* sendbuf,
283  void* recvbuf,
284  int count,
285  SCOREP_Ipc_Datatype datatype,
286  int root );
287 
288 
307  int
308  ( * SCOREP_Ipc_Gatherv )( const void* sendbuf,
309  int sendcount,
310  void* recvbuf,
311  const int* recvcnts,
312  SCOREP_Ipc_Datatype datatype,
313  int root );
314 
315 
330  int
331  ( * SCOREP_Ipc_Allgather )( const void* sendbuf,
332  void* recvbuf,
333  int count,
334  SCOREP_Ipc_Datatype datatype );
335 
350  int
351  ( * SCOREP_Ipc_Reduce )( const void* sendbuf,
352  void* recvbuf,
353  int count,
354  SCOREP_Ipc_Datatype datatype,
355  SCOREP_Ipc_Operation operation,
356  int root );
357 
358 
372  int
373  ( * SCOREP_Ipc_Allreduce )( const void* sendbuf,
374  void* recvbuf,
375  int count,
376  SCOREP_Ipc_Datatype datatype,
377  SCOREP_Ipc_Operation operation );
378 
391  int
392  ( * SCOREP_Ipc_Scatter )( const void* sendbuf,
393  void* recvbuf,
394  int count,
395  SCOREP_Ipc_Datatype datatype,
396  int root );
397 
398 
413  int
414  ( * SCOREP_Ipc_Scatterv )( const void* sendbuf,
415  const int* sendcounts,
416  void* recvbuf,
417  int recvcount,
418  SCOREP_Ipc_Datatype datatype,
419  int root );
426  ( * SCOREP_Location_GetType )( const struct SCOREP_Location* locationData );
427 
433  const char*
434  ( *SCOREP_Location_GetName )( const struct SCOREP_Location* locationData );
435 
436 
443  uint32_t
444  ( * SCOREP_Location_GetId )( const struct SCOREP_Location* locationData );
445 
452  uint64_t
453  ( * SCOREP_Location_GetGlobalId )( const struct SCOREP_Location* locationData );
454 
463  void
464  ( * SCOREP_Location_SetData )( const struct SCOREP_Location* locationData,
465  size_t plugin_id,
466  void* data );
467 
476  void*
477  ( *SCOREP_Location_GetData )( const struct SCOREP_Location* locationData,
478  size_t plugin_id );
479 
486  ( * SCOREP_CallingContextHandle_GetRegion )( SCOREP_CallingContextHandle handle );
487 
493  SCOREP_CallingContextHandle
494  ( * SCOREP_CallingContextHandle_GetParent )( SCOREP_CallingContextHandle handle );
495 
504 
510  const char*
511  ( *SCOREP_MetricHandle_GetName )( SCOREP_MetricHandle handle );
512 
521 
530 
539 
548 
554  const char*
555  ( *SCOREP_ParadigmHandle_GetName )( SCOREP_ParadigmHandle handle );
556 
565 
571  const char*
572  ( *SCOREP_ParameterHandle_GetName )( SCOREP_ParameterHandle handle );
573 
574 
582  ( * SCOREP_ParameterHandle_GetType )( SCOREP_ParameterHandle handle );
583 
584 
590  uint32_t
592 
598  const char*
599  ( *SCOREP_RegionHandle_GetName )( SCOREP_RegionHandle handle );
600 
606  const char*
607  ( *SCOREP_RegionHandle_GetCanonicalName )( SCOREP_RegionHandle handle );
608 
614  const char*
615  ( *SCOREP_RegionHandle_GetFileName )( SCOREP_RegionHandle handle );
616 
624 
632 
641 
650 
657 
663  const SCOREP_MetricHandle* ( *SCOREP_SamplingSetHandle_GetMetricHandles )( SCOREP_SamplingSetHandle handle );
664 
671 
678 
685 
692 
698  const char*
699  ( *SCOREP_SourceFileHandle_GetName )( SCOREP_SourceFileHandle handle );
700 
706  const char*
707  ( *SCOREP_StringHandle_Get )( SCOREP_StringHandle handle );
708 
717  void
718  ( * SCOREP_Metric_WriteStrictlySynchronousMetrics )( struct SCOREP_Location* location,
719  uint64_t timestamp,
721 
730  void
731  ( * SCOREP_Metric_WriteSynchronousMetrics )( struct SCOREP_Location* location,
732  uint64_t timestamp,
735 
736 
778 {
783  uint32_t plugin_version;
784 
790  int ( * init )( void );
791 
802  void ( * assign_id )( size_t pluginId );
803 
809  void ( * init_mpp )( void );
810 
814  void ( * finalize )( void );
815 
839  void ( * create_location )( const struct SCOREP_Location* location,
840  const struct SCOREP_Location* parentLocation );
841 
852  void ( * activate_cpu_location )( const struct SCOREP_Location* location,
853  const struct SCOREP_Location* parentLocation,
854  uint32_t forkSequenceCount );
855 
864  void ( * deactivate_cpu_location )( const struct SCOREP_Location* location,
865  const struct SCOREP_Location* parentLocation );
866 
873  void ( * delete_location )( const struct SCOREP_Location* location );
874 
879  void ( * pre_unify )( void );
880 
886  void ( * write_data )( void );
887 
894  void ( * core_task_create )( const struct SCOREP_Location* location,
895  SCOREP_TaskHandle taskHandle );
896 
897 
904  void ( * core_task_complete )( const struct SCOREP_Location* location,
905  SCOREP_TaskHandle taskHandle );
906 
917  SCOREP_HandleType type );
918 
929  SCOREP_Substrates_Callback** functions );
930 
936  void ( * set_callbacks )( const SCOREP_SubstratePluginCallbacks* callbacks,
937  size_t size );
938 
949 
961 
962 #endif /* SCOREP_SUBSTRATE_PLUGINS_H */
void(* SCOREP_Metric_WriteSynchronousMetrics)(struct SCOREP_Location *location, uint64_t timestamp, SCOREP_Substrates_WriteAsynchMetricBeforeEventCb cb)
Tell Score-P to write the current synchronous metrics to cb.
Definition: SCOREP_SubstratePlugins.h:731
SCOREP_AnyHandle SCOREP_SamplingSetHandle
Definition: SCOREP_PublicTypes.h:109
struct SCOREP_Task * SCOREP_TaskHandle
Definition: SCOREP_PublicTypes.h:145
Defines public definitions that are used internally and externally (e.g., by metric plugins...
int(* SCOREP_Ipc_Allgather)(const void *sendbuf, void *recvbuf, int count, SCOREP_Ipc_Datatype datatype)
Definition: SCOREP_SubstratePlugins.h:331
bool(* SCOREP_SamplingSetHandle_IsScoped)(SCOREP_SamplingSetHandle handle)
Definition: SCOREP_SubstratePlugins.h:677
uint64_t(* SCOREP_Location_GetGlobalId)(const struct SCOREP_Location *locationData)
Definition: SCOREP_SubstratePlugins.h:453
int64_t(* get_requirement)(SCOREP_Substrates_RequirementFlag flag)
Definition: SCOREP_SubstratePlugins.h:948
SCOREP_AnyHandle SCOREP_SourceFileHandle
Definition: SCOREP_PublicTypes.h:84
Definition: SCOREP_SubstratePlugins.h:167
void(* core_task_create)(const struct SCOREP_Location *location, SCOREP_TaskHandle taskHandle)
Definition: SCOREP_SubstratePlugins.h:894
int(* SCOREP_Ipc_Reduce)(const void *sendbuf, void *recvbuf, int count, SCOREP_Ipc_Datatype datatype, SCOREP_Ipc_Operation operation, int root)
Definition: SCOREP_SubstratePlugins.h:351
SCOREP_HandleType
Definition: SCOREP_PublicHandles.h:50
SCOREP_AnyHandle SCOREP_MetricHandle
Definition: SCOREP_PublicTypes.h:96
SCOREP_CallingContextHandle(* SCOREP_CallingContextHandle_GetParent)(SCOREP_CallingContextHandle handle)
Definition: SCOREP_SubstratePlugins.h:494
int(* SCOREP_Ipc_Gather)(const void *sendbuf, void *recvbuf, int count, SCOREP_Ipc_Datatype datatype, int root)
Definition: SCOREP_SubstratePlugins.h:282
void(* SCOREP_Substrates_Callback)(void)
Definition: SCOREP_SubstrateEvents.h:43
void(* deactivate_cpu_location)(const struct SCOREP_Location *location, const struct SCOREP_Location *parentLocation)
Definition: SCOREP_SubstratePlugins.h:864
void(* write_data)(void)
Definition: SCOREP_SubstratePlugins.h:886
int(* SCOREP_Ipc_Bcast)(void *buf, int count, SCOREP_Ipc_Datatype datatype, int root)
Definition: SCOREP_SubstratePlugins.h:259
void(* SCOREP_Location_SetData)(const struct SCOREP_Location *locationData, size_t plugin_id, void *data)
Definition: SCOREP_SubstratePlugins.h:464
SCOREP_MetricSourceType(* SCOREP_MetricHandle_GetSourceType)(SCOREP_MetricHandle handle)
Definition: SCOREP_SubstratePlugins.h:538
int(* SCOREP_Ipc_Recv)(void *buf, int count, SCOREP_Ipc_Datatype datatype, int source)
Definition: SCOREP_SubstratePlugins.h:230
uint8_t(* SCOREP_SamplingSetHandle_GetNumberOfMetrics)(SCOREP_SamplingSetHandle handle)
Definition: SCOREP_SubstratePlugins.h:656
void(* SCOREP_Substrates_WriteAsynchMetricBeforeEventCb)(struct SCOREP_Location *location, uint64_t timestamp, SCOREP_SamplingSetHandle samplingSet, const uint64_t *metricValues)
Definition: SCOREP_SubstrateEvents.h:1399
SCOREP_MetricValueType
Definition: SCOREP_MetricTypes.h:97
void(* finalize)(void)
Definition: SCOREP_SubstratePlugins.h:814
SCOREP_Substrates_RequirementFlag
Definition: SCOREP_PublicTypes.h:668
int(* SCOREP_Ipc_GetSize)(void)
Definition: SCOREP_SubstratePlugins.h:186
SCOREP_MetricMode(* SCOREP_MetricHandle_GetMode)(SCOREP_MetricHandle handle)
Definition: SCOREP_SubstratePlugins.h:529
Description of the substrate plugin events header. For information on how to use substrate plugins...
uint32_t(* get_event_functions)(SCOREP_Substrates_Mode mode, SCOREP_Substrates_Callback **functions)
Definition: SCOREP_SubstratePlugins.h:928
SCOREP_AnyHandle SCOREP_ParadigmHandle
Definition: SCOREP_PublicTypes.h:133
int(* SCOREP_Ipc_Scatterv)(const void *sendbuf, const int *sendcounts, void *recvbuf, int recvcount, SCOREP_Ipc_Datatype datatype, int root)
Definition: SCOREP_SubstratePlugins.h:414
uint32_t plugin_version
Definition: SCOREP_SubstratePlugins.h:783
SCOREP_ParadigmType
defines paradigms that are be monitored
Definition: SCOREP_PublicTypes.h:307
SCOREP_MetricMode
Definition: SCOREP_MetricTypes.h:133
void(* core_task_complete)(const struct SCOREP_Location *location, SCOREP_TaskHandle taskHandle)
Definition: SCOREP_SubstratePlugins.h:904
void(* init_mpp)(void)
Definition: SCOREP_SubstratePlugins.h:809
SCOREP_LineNo(* SCOREP_RegionHandle_GetBeginLine)(SCOREP_RegionHandle handle)
Definition: SCOREP_SubstratePlugins.h:623
int(* SCOREP_Ipc_Send)(const void *buf, int count, SCOREP_Ipc_Datatype datatype, int dest)
Definition: SCOREP_SubstratePlugins.h:211
SCOREP_ParadigmClass(* SCOREP_ParadigmHandle_GetClass)(SCOREP_ParadigmHandle handle)
Definition: SCOREP_SubstratePlugins.h:547
void(* pre_unify)(void)
Definition: SCOREP_SubstratePlugins.h:879
SCOREP_Substrates_Mode
Definition: SCOREP_SubstrateEvents.h:52
void(* SCOREP_Metric_WriteStrictlySynchronousMetrics)(struct SCOREP_Location *location, uint64_t timestamp, SCOREP_Substrates_WriteAsynchMetricBeforeEventCb cb)
Tell Score-P to write the current strictly synchronous metrics to cb.
Definition: SCOREP_SubstratePlugins.h:718
Description of definition handles. This header defines an enumeration to map SCOREP_AnyHandle to spec...
SCOREP_LocationType(* SCOREP_Location_GetType)(const struct SCOREP_Location *locationData)
Definition: SCOREP_SubstratePlugins.h:426
void(* activate_cpu_location)(const struct SCOREP_Location *location, const struct SCOREP_Location *parentLocation, uint32_t forkSequenceCount)
Definition: SCOREP_SubstratePlugins.h:852
SCOREP_MetricSourceType
Definition: SCOREP_MetricTypes.h:53
SCOREP_RegionHandle(* SCOREP_CallingContextHandle_GetRegion)(SCOREP_CallingContextHandle handle)
Definition: SCOREP_SubstratePlugins.h:486
int(* SCOREP_Ipc_Allreduce)(const void *sendbuf, void *recvbuf, int count, SCOREP_Ipc_Datatype datatype, SCOREP_Ipc_Operation operation)
Definition: SCOREP_SubstratePlugins.h:373
SCOREP_MetricScope(* SCOREP_SamplingSetHandle_GetScope)(SCOREP_SamplingSetHandle handle)
Definition: SCOREP_SubstratePlugins.h:684
int(* SCOREP_Ipc_Scatter)(const void *sendbuf, void *recvbuf, int count, SCOREP_Ipc_Datatype datatype, int root)
Definition: SCOREP_SubstratePlugins.h:392
SCOREP_LineNo(* SCOREP_RegionHandle_GetEndLine)(SCOREP_RegionHandle handle)
Definition: SCOREP_SubstratePlugins.h:631
SCOREP_MetricValueType(* SCOREP_MetricHandle_GetValueType)(SCOREP_MetricHandle handle)
Definition: SCOREP_SubstratePlugins.h:503
int(* init)(void)
Definition: SCOREP_SubstratePlugins.h:790
SCOREP_ParadigmType(* SCOREP_RegionHandle_GetParadigmType)(SCOREP_RegionHandle handle)
Definition: SCOREP_SubstratePlugins.h:649
uint32_t SCOREP_LineNo
Definition: SCOREP_PublicTypes.h:51
SCOREP_RegionType(* SCOREP_RegionHandle_GetType)(SCOREP_RegionHandle handle)
Definition: SCOREP_SubstratePlugins.h:640
SCOREP_SamplingSetClass
Class of locations which recorded a sampling set.
Definition: SCOREP_PublicTypes.h:546
SCOREP_Ipc_Operation
specifies an inter process communication operation for reduce function
Definition: SCOREP_PublicTypes.h:649
SCOREP_Allocator_MovableMemory SCOREP_AnyHandle
Definition: SCOREP_PublicTypes.h:78
int(* SCOREP_Ipc_GetRank)(void)
Definition: SCOREP_SubstratePlugins.h:196
SCOREP_ParameterType
defines types to be used in defining a parameter for parameter based profiling (SCOREP_Definitions_Ne...
Definition: SCOREP_PublicTypes.h:324
int(* SCOREP_Ipc_Gatherv)(const void *sendbuf, int sendcount, void *recvbuf, const int *recvcnts, SCOREP_Ipc_Datatype datatype, int root)
Definition: SCOREP_SubstratePlugins.h:308
void(* create_location)(const struct SCOREP_Location *location, const struct SCOREP_Location *parentLocation)
Definition: SCOREP_SubstratePlugins.h:839
SCOREP_ParadigmType(* SCOREP_ParadigmHandle_GetType)(SCOREP_ParadigmHandle handle)
Definition: SCOREP_SubstratePlugins.h:564
SCOREP_ParadigmClass
defines classes of paradigms that are monitored Types:
Definition: SCOREP_PublicTypes.h:259
SCOREP_MetricProfilingType
Definition: SCOREP_MetricTypes.h:76
uint32_t(* SCOREP_RegionHandle_GetId)(SCOREP_RegionHandle handle)
Definition: SCOREP_SubstratePlugins.h:591
uint32_t(* SCOREP_Location_GetId)(const struct SCOREP_Location *locationData)
Definition: SCOREP_SubstratePlugins.h:444
void(* assign_id)(size_t pluginId)
Definition: SCOREP_SubstratePlugins.h:802
Definition: SCOREP_SubstratePlugins.h:777
SCOREP_ParameterType(* SCOREP_ParameterHandle_GetType)(SCOREP_ParameterHandle handle)
Definition: SCOREP_SubstratePlugins.h:582
#define SCOREP_SUBSTRATE_PLUGIN_UNDEFINED_MANAGEMENT_FUNCTIONS
Definition: SCOREP_SubstratePlugins.h:147
SCOREP_Ipc_Datatype
specifies an inter process communication data types
Definition: SCOREP_PublicTypes.h:621
void(* undeclared[SCOREP_SUBSTRATE_PLUGIN_UNDEFINED_MANAGEMENT_FUNCTIONS])(void)
Definition: SCOREP_SubstratePlugins.h:959
void(* delete_location)(const struct SCOREP_Location *location)
Definition: SCOREP_SubstratePlugins.h:873
SCOREP_MetricOccurrence(* SCOREP_SamplingSetHandle_GetMetricOccurrence)(SCOREP_SamplingSetHandle handle)
Definition: SCOREP_SubstratePlugins.h:670
void(* new_definition_handle)(SCOREP_AnyHandle handle, SCOREP_HandleType type)
Definition: SCOREP_SubstratePlugins.h:916
SCOREP_AnyHandle SCOREP_RegionHandle
Definition: SCOREP_PublicTypes.h:121
SCOREP_MetricScope
Types to be used in defining the scope of a scoped sampling set.
Definition: SCOREP_PublicTypes.h:558
int(* SCOREP_Ipc_Barrier)(void)
Definition: SCOREP_SubstratePlugins.h:244
SCOREP_MetricProfilingType(* SCOREP_MetricHandle_GetProfilingType)(SCOREP_MetricHandle handle)
Definition: SCOREP_SubstratePlugins.h:520
void(* set_callbacks)(const SCOREP_SubstratePluginCallbacks *callbacks, size_t size)
Definition: SCOREP_SubstratePlugins.h:936
SCOREP_LocationType
Definition: SCOREP_PublicTypes.h:190
SCOREP_SamplingSetClass(* SCOREP_SamplingSetHandle_GetSamplingSetClass)(SCOREP_SamplingSetHandle handle)
Definition: SCOREP_SubstratePlugins.h:691
SCOREP_MetricOccurrence
Types to be used in defining the occurrence of a sampling set.
Definition: SCOREP_PublicTypes.h:577
SCOREP_RegionType
specifies a Region
Definition: SCOREP_PublicTypes.h:428