检索规则说明:AND代表“并且”;OR代表“或者”;NOT代表“不包含”;(注意必须大写,运算符两边需空一格)
检 索 范 例 :范例一: (K=图书馆学 OR K=情报学) AND A=范并思 范例二:J=计算机应用与软件 AND (U=C++ OR U=Basic) NOT M=Visual
出 处:《计算机应用》2016年第9期2422-2426,2431,共6页journal of Computer Applications
基 金:国家自然科学基金资助项目(61136002;61272120)~~
摘 要:针对当前大量遗产代码无法重复利用的问题,设计一种新的编译工具将C的串行代码转换为基于MPI+Open MP的混合并行编程代码,降低了并行编程的开发成本。首先,通过对Java CC的优化,实现一种可以解析C语言的词法和语法分析器,进行源代码分析并生成抽象语法树;其次,根据语法树对源代码进行控制依赖性和数据依赖性分析,产生可并行化的语句块分区;再次,按照提出的并行代码生成方法得到目标代码;最后,基于Visual Studio 2010构建目标代码仿真验证环境。实验结果表明,该工具可以较为理想地实现串行代码自动并行化,与手工编写的代码在加速比上的误差为8.2%~18.4%。Aiming at the problem that a large amount of legacy code can not be reused, a new compilation tool was designed to convert the serial code of C into a hybrid parallel programming code based on MPI + OpenMP, which can reduce the development cost of parallel programming. First of all, by optimizing Java Compiler Compiler (JavaCC), a lexical and syntax analyzer which can parse the C language was implemented, then the source code analysis was conducted and the abstract syntax tree was generated. Secondly, according to the abstract syntax tree, the control dependence and data dependence of the source code were analyzed to produce the parallelizable statement block partitions. Thirdly, the object code was obtained according to the proposed parallel code generation method. Finally, the target code simulation environment was built based on Visual Studio 2010. The experimental results show that the tool can effectively achieve automatic parallelization of the serial code, and compared with the code written by hand, its speedup of the error is between 8.2% to 18.4%.
关 键 词:JAVACC 抽象语法树 依赖性 自动并行化 MPI+OPENMP
分 类 号:TP311[自动化与计算机技术—计算机软件与理论]
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在链接到云南高校图书馆文献保障联盟下载...
云南高校图书馆联盟文献共享服务平台 版权所有©
您的IP:3.148.239.85