SET CALCDIAGNOSTICS

The SET CALCDIAGNOSTICS calculation command for Essbase enables diagnostic logging for parallel calculation tasks.

Parallel tasks are those generated by CALCPARALLEL or FIXPARALLEL commands. Enabling diagnostic logging instructs Essbase to log the calculation time of the longest running parallel tasks.

Syntax

SET CALCDIAGNOSTICS { LOGSIZE numTasks; };

Parameters

LOGSIZE

A required keyword.

numTasks

How many of the top longest-running tasks to log. To disable diagnostic logging in the calculation script, set numTasks to 0.

Notes

  • Diagnostics logging is not on by default, because it has performance overhead. After you are finished designing or optimizing your calculation script, you should turn off diagnostic logging.

  • When used inside a FIXPARALLEL block, this command only takes effect within that block.

Example

The following example enables diagnostic logging for all parallel calculations in the calculation script.


SET CALCDIAGNOSTICS { LOGSIZE 4; };

FIXPARALLEL (2, @IDESCENDANT("US_Market"))
   AGG ("Product");
ENDFIXPARALLEL

The following example enables diagnostic logging for a specific FIXPARALLEL block.

FIXPARALLEL (2, @IDESCENDANT("US_Market"))
   SET CALCDIAGNOSTICS { LOGSIZE 4; };
   AGG ("Product");
ENDFIXPARALLEL

Sample Diagnostic Log Output for FIXPARALLEL

The following sample output pertains to FIXPARALLEL parallel calculation.


OK/INFO - 1012899 - Statistics for [Calc1.csc], FIXPARALLEL of index [1] at line [14]: Number of FIXPARALLEL Threads = [2], Total Tasks = [261], Min/Max/Avg Thread's Time = [103.453]/[103.519]/[103.486] secs.
 OK/INFO - 1012899 - For [4] Longest tasks, next rows display : Time(secs), Thread_id, (Task_index/Task_count), Task_id, Member-combinations.
 OK/INFO - 1012899 - 15.131, 1, (30/132), 53, [ID_051341].
 OK/INFO - 1012899 - 10.759, 2, (124/129), 211, [ID_050092].
 OK/INFO - 1012899 - 9.690, 1, (42/132), 125, [ID_052230].
 OK/INFO - 1012899 - 7.192, 1, (38/132), 105, [ID_052073].
 OK/INFO - 1012899 - Summary for thread[1]: Total Time = [103.519] secs, Total Tasks = [132].
 OK/INFO - 1012899 - Longest tasks executing on thread[1] : Time(secs), Thread_id, (Task_index/Task_count), Task_id.
 OK/INFO - 1012899 - 15.131, 1, (30/132), 53.
 OK/INFO - 1012899 - 7.192, 1, (38/132), 105.
 OK/INFO - 1012899 - 9.690, 1, (42/132), 125.
 OK/INFO - 1012899 - Summary for thread[2]: Total Time = [103.453] secs, Total Tasks = [129].
 OK/INFO - 1012899 - Longest tasks executing on thread[2] : Time(secs), Thread_id, (Task_index/Task_count), Task_id.
 OK/INFO - 1012899 - 10.759, 2, (124/129), 211.

The diagnostic output is organized into 3 sections.

Log Section 1

The following section contains general information about the command being diagnosed.


OK/INFO - 1012899 - Statistics for [Calc1.csc], FIXPARALLEL of index [1] at line [14]: Number of FIXPARALLEL Threads = [2], Total Tasks = [261], Min/Max/Avg Thread's Time = [103.453]/[103.519]/[103.486] secs.
  • Calc script name: Calc1.csc

  • Command ID: FIXPARALLEL at index[1] (the first FIXPARALLEL command in Calc1.csc)

  • Other information: Up to 2 threads are used for this calculation. It contains 261 parallel tasks. The calculation time is about 104 seconds.

Log Section 2

The following section contains information about the longest running tasks.


 OK/INFO - 1012899 - For [4] Longest tasks, next rows display : Time(secs), Thread_id, (Task_index/Task_count), Task_id, Member-combinations.
 OK/INFO - 1012899 - 15.131, 1, (30/132), 53, [ID_051341].
 OK/INFO - 1012899 - 10.759, 2, (124/129), 211, [ID_050092].
 OK/INFO - 1012899 - 9.690, 1, (42/132), 125, [ID_052230].
 OK/INFO - 1012899 - 7.192, 1, (38/132), 105, [ID_052073].

The per-task diagnostic information is in columnar format. The following table describes each column, to help you interpret the data.

Table 3-3 Calc Diagnostic Output Columns

Output Column Description
Diagnostic Message ID The message ID. For example, OK/INFO - 1012899. This ID can be used to extract diagnostic information from the application log into a file.
Time (secs) Task execution time in seconds. For example, 15.131. The tasks are listed in decreasing order based on execution time.
Thread ID Calculation thread ID. For example, 1. This calculation uses up to 2 threads, so the thread ID will always be 1 or 2.
Task Index/Task Count The task index and the total task count. For example, 30/132, which indicates that this is the 30th task executed by this thread, and that this thread executes a total of 132 tasks.
Task ID The task ID number. For example, 53. The first task has an ID of 1, but 53 is listed first because it was the longest running task. Note that as indicated by Log Section 1, there are 261 total tasks.
Member Combinations The member names that form the slice corresponding to a task ID. For example, 53,[ID_051341] means that this calculation task is defined by the slice specified by task 53 and the member [ID_051341].

Log Section 3

The following section contains a summary of information already shown in Section 2, but groups the information per separate thread.


OK/INFO - 1012899 - Summary for thread[1]: Total Time = [103.519] secs, Total Tasks = [132].
 OK/INFO - 1012899 - Longest tasks executing on thread[1] : Time(secs), Thread_id, (Task_index/Task_count), Task_id.
 OK/INFO - 1012899 - 15.131, 1, (30/132), 53.
 OK/INFO - 1012899 - 7.192, 1, (38/132), 105.
 OK/INFO - 1012899 - 9.690, 1, (42/132), 125.
 OK/INFO - 1012899 - Summary for thread[2]: Total Time = [103.453] secs, Total Tasks = [129].
 OK/INFO - 1012899 - Longest tasks executing on thread[2] : Time(secs), Thread_id, (Task_index/Task_count), Task_id.
 OK/INFO - 1012899 - 10.759, 2, (124/129), 211.