-
Notifications
You must be signed in to change notification settings - Fork 12
/
pario.C
41 lines (31 loc) · 921 Bytes
/
pario.C
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#include <stdio.h>
#include <iostream>
#include "pario.h"
#include <stdio.h>
#include <execinfo.h>
#include <stdlib.h>
#include <unistd.h>
void print_trace(int nSig)
{
printf("print_trace: got signal %d\n", nSig);
void *array[32]; /* Array to store backtrace symbols */
size_t size; /* To store the exact no of values stored */
char **strings; /* To store functions from the backtrace list in ARRAY */
size_t nCnt;
size = backtrace(array, 32);
strings = backtrace_symbols(array, size);
/* prints each string of function names of trace*/
for (nCnt = 0; nCnt < size; nCnt++)
fprintf(stderr, "%s\n", strings[nCnt]);
abort();
}
#ifdef MOLPRO
#include "global/CxOutputStream.h"
blockout Bout(&xout);
blockerr Berr(&xerr);
#else
blockout Bout;
blockerr Berr;
#endif
std::ostream &bout = *(Bout.outstream);
std::ostream &berr = *(Berr.errstream);