⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 check_callstack.c

📁 fortran并行计算包
💻 C
字号:
#include <stdio.h>#include <unistd.h>#include "mpe_callstack.h"#define MAX_RECURSIVE_COUNT  3static int dummy_count;void dummy_subroutine( void );void dummy_subroutine( void ){    MPE_CallStack_t  callstack;    MPE_CallStack_init( &callstack );    dummy_count++;    printf( "dummy_count = %d:\n", dummy_count );#if defined( SIMPLE_PRINT )    MPE_CallStack_print( &callstack, STDOUT_FILENO );#elif defined( FANCY_PRINT )    MPE_CallStack_fancyprint( &callstack, STDOUT_FILENO,                              "*****", 1, MPE_CALLSTACK_UNLIMITED );#else    MPE_CallStack_iteratorInit( &callstack );    while ( MPE_CallStack_iteratorHasMore( &callstack ) ) {        printf( "    %s\n", MPE_CallStack_iteratorFetchNext( &callstack) );    }#endif    if ( dummy_count < MAX_RECURSIVE_COUNT )        dummy_subroutine();    /* printf( "hello world!\n" ); */}int main( int argc, char *argv[] ){    dummy_count = 0;    dummy_subroutine();    return 0;}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -