---
name: "PGADebugPrint"
section: "3"
platform: "linux"
package: "pgapack"
version: "1.1.1-3"
release: "Debian 8 (Jessie)"
platforms: ["linux"]
url: "https://new.carta.tech/PGADebugPrint"
---

# PGADebugPrint(3)

Write debugging information

## NAME

PGADebugPrint - Write debugging information

## INPUT PARAMETERS

- ctx

  \- context variable

- level

  \- a symbolic constant that maps to the type of print requested (e.g., an entry or exit print).  Valid values are PGA\_DEBUG\_ENTERED, PGA\_DEBUG\_EXIT, PGA\_DEBUG\_MALLOC, PGA\_DEBUG\_PRINTVAR, PGA\_DEBUG\_SEND, and PGA\_DEBUG\_RECV.

- funcname

  \- the name of the function that called this routine

- msg

  \- message to print

- datatype

  \- a symbolic constant that maps to the data type of the parameter data.  Valid choices are PGA\_INT, PGA\_DOUBLE, PGA\_CHAR and PGA\_VOID (no data).

- data

  \- a pointer, whose contents will be interpreted based upon the datatype parameter (or NULL, if PGA\_VOID).

## OUTPUT PARAMETERS

- none

  ## SYNOPSIS

```
#include "pgapack.h"
void  PGADebugPrint(ctx, level, funcname, msg, datatype, data)
PGAContext *ctx
int level
char *funcname
char *msg
int datatype
void *data
```

## LOCATION

debug.c

## EXAMPLE

```
Example:
If the debugging level includes printing variables (level 82), print the
value of the integer variable num as a debugging tool in the routine
Add2Nums
PGAContext *ctx;
int num;
:
PGADebugPrint(ctx, PGA_DEBUG_PRINTVAR, "Add2Nums", "num = ", PGA_INT,
(void *) &num);
```
