How to determine what gfortran is vectorizing

2019-02-25 00:22发布

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

2条回答
Explosion°爆炸
2楼-- · 2019-02-25 00:58

You can try, if -fopt-info suits you needs.

You can get more output by using -fopt-info-all which includes information on successfull and missed optimization.

查看更多
手持菜刀,她持情操
3楼-- · 2019-02-25 01:02

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).

查看更多
登录 后发表回答