如何确定什么gfortran矢量化

如何确定什么gfortran矢量化

本文介绍了如何确定什么gfortran矢量化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图写出一个大规模平行的蒙特卡罗代码,其中一部分将被导出到一个至强协处理器。为了确保我有效地使用协处理器,我想看看编译器的哪些部分,目前gfortran能够进行矢量化。我知道我可以使用ifort commane -vec-report来做到这一点。但是,我将无法访问协处理器大约一个月,因此暂时停留在gfortran上。不过,如果可能的话,我想现在就开始优化。不幸的是,我似乎无法找到gfortran的命令行标志,它告诉我代码的哪一部分正在被矢量化。有一个吗?如果是这样,它是什么?



谢谢

解决方案

可以指示详细并报告它的作用:

-ftree-vectorizer -verbose = n



其中较大的整数 n 表示更详细的报表。



欲了解更多信息,请参阅



(它让我花了1分钟时间Google它)。


I am trying to write a massively parallel monte carlo code part of which will be exported to a xeon phi coprocessor. To ensure that I am using the coprocessor efficiently, I would like to see which parts of my code the compiler, currently gfortran, is able to vectorize. I understand I can do this using the ifort commane -vec-report. However, I won't have access to the coprocessor for about a month, and therefore am stuck with gfortran for the time being. However, I would like to start optimizing now if possible. Unfortanately, I cannot seem to find the command line flag for gfortran that tells me which part of the code is being vectorized. Is there one. If so, what is it?

thanks

解决方案

The vectorizer can be instructed to be verbose and report what it does:

-ftree-vectorizer-verbose=n

where larger integer n means more verbose report.

For more see http://gcc.gnu.org/projects/tree-ssa/vectorization.html

(It took me 1 minute to google it).

这篇关于如何确定什么gfortran矢量化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-11 16:02