PGI Compiler for OpenACC Output Syntax Highlighting

When use the PGI compiler to compile codes with OpenACC clauses, there will be lots of outputs. To read it more clearly, you may want the syntax highlighting. But the original bash may not support it(except zsh, fish etc.). Thus, saving the outputs into a log file, and viewing it with source-highlight is a practical way.

  • Under Linux, first we need source-highlight
sudo apt-get install source-highlight
  • Then make alias as bcat in ~/.bashrc
alias bcat='source-highlight -s bash --out-format=esc -o STDOUT -i'
  • Source your .bashrc file
source ~/.bashrc
  • When compile the source code with PGI, you can save the outputs into a log file acc.log:
pgc++ -acc -Minfo=accel -ta=nvidia test.cpp > acc.log 2>&1
  • Then use bcat command to view the outputs,
bcat acc.log
  • and it will be colorful
feq(double, double, double, double):
34, Generating implicit acc routine seq
Init():
76, Generating update device(u[:][:][:],rho[:][:])
Generating present(f[:][:][:],F[:][:][:],rho[:][:],u[:][:][:],w[:],e[:][:])
Loop is parallelizable
78, Loop is parallelizable
Accelerator kernel generated
Generating Tesla code
76, #pragma acc loop gang /* blockIdx.y */
78, #pragma acc loop gang, vector(128) /* blockIdx.x threadIdx.x */
83, Loop is parallelizable
Collision():
101, Generating present(f[:][:][:],rho[:][:],u[:][:][:],w[:],e[:][:])
Loop is parallelizable
103, Loop is parallelizable
Accelerator kernel generated
Generating Tesla code
101, #pragma acc loop gang /* blockIdx.y */
103, #pragma acc loop gang, vector(128) /* blockIdx.x threadIdx.x */
108, Loop is parallelizable

pygmentize -g is also an good option.

未经作者同意禁止转载,作者保留一切权利。相关问题请联系chasenwu@live.com

PGI Compiler for OpenACC Output Syntax Highlighting的更多相关文章

  1. Quick Tip: How to Add Syntax Highlighting to Any Project

    Quick Tip: How to Add Syntax Highlighting to Any Projectpublic String showAllArticleForPage() throws ...

  2. How to turn on syntax highlighting in osx

    put follow code in ~/.vimrc set ai " auto indenting set history=100 " keep 100 lines of hi ...

  3. [VSCode] Adding Custom Syntax Highlighting to a Theme in VSCode

    VSCode Themes are a quick way to update the color scheme and syntax highlighting of your code, but y ...

  4. Syntax highlighting in fenced code blocks

    Python @requires_authorization def somefunc(param1='', param2=0): r'''A docstring''' if param1 > ...

  5. TOP 10 ONLINE COMPILER

    Top 10 Online Compilers +1338 Tweet Share106 Share Pin 444 Shares Online compilers are one type of t ...

  6. OpenACC 异步计算

    ▶ 按照书上的例子,使用 async 导语实现主机与设备端的异步计算 ● 代码,非异步的代码只要将其中的 async 以及第 29 行删除即可 #include <stdio.h> #in ...

  7. Java programming language compiler

    https://docs.oracle.com/javase/7/docs/technotes/tools/windows/javac.html\ javac - Java programming l ...

  8. Output of C++ Program | Set 12

    Predict the output of following C++ programs. Question 1 1 #include <iostream> 2 using namespa ...

  9. CodeBlocks使用技巧

    快键键 注释:选中后Shfit + C 取消注释:选中后Shfit + X 查找替换:Ctrl + R Build(Ctrl + F9) Run (Ctrl + F10) Build + Run (F ...

随机推荐

  1. Collection学习目录

    1.Collection<E>.Iterable<T>和Iterator<E>接口 2.ArrayList源码分析 3.LinkedList源码解析 4.Vecto ...

  2. 机器学习:从编程的角度理解BP神经网络

    1.简介(只是简单介绍下理论内容帮助理解下面的代码,如果自己写代码实现此理论不够) 1) BP神经网络是一种多层网络算法,其核心是反向传播误差,即: 使用梯度下降法(或其他算法),通过反向传播来不断调 ...

  3. 单片机IAP学习

    1.IAP是什么--简介 IAP是In Application Programming的首字母缩写,IAP是用户自己的程序在运行过程中对User Flash的部分区域进行烧写,目的是为了在产品发布后可 ...

  4. 深度解析MySQL启动时报“The server quit without updating PID file”错误的原因

    很多童鞋在启动mysql的时候,碰到过这个错误, 首先,澄清一点,出现这个错误的前提是:通过服务脚本来启动mysql.通过mysqld_safe或mysqld启动mysql实例并不会报这个错误. 那么 ...

  5. 龟兔赛跑,杭电oj-2059

    原题地址:http://acm.hdu.edu.cn/showproblem.php?pid=2059 [Problem Description] 据说在很久很久以前,可怜的兔子经历了人生中最大的打击 ...

  6. C语言中,隐藏结构体的细节

    我们都知道,在C语言中,结构体中的字段都是可以访问的.或者说,在C++ 中,类和结构体的主要区别就是类中成员变量默认为private,而结构体中默认为public.结构体的这一个特性,导致结构体中封装 ...

  7. 【less和sass的区别,你了解多少?】

    在介绍less和sass的区别之前,我们先来了解一下他们的定义: 一.Less.Sass/Scss是什么? 1.Less: 是一种动态样式语言. 对CSS赋予了动态语言的特性,如变量.继承.运算.函数 ...

  8. 2017PHP程序员的进阶之路

    2017PHP程序员的进阶之路 又是一年毕业季,可能会有好多毕业生即将进入开发这个圈子,踏上码农这个不归路.根据这些年在开发圈子总结的LNMP程序猿发展轨迹,结合个人经验体会,总结出很多程序员对未来的 ...

  9. python的列表(二)

    1.遍历整个列表  #for 循环 # >>> name_list['faker', 'dopa', 'gogoing', 'uzi']  >>> for LOL_ ...

  10. neutron flat和vxlan网络访问外网流量走向

    OpenStack版本:Mitaka 物理节点: Hostname Management IP Tunnel IP Role test-ctrl-01 192.168.100.11 192.168.1 ...