如何获得在f2py包装中花费多少时间 [英] How to obtain how much time is spent in f2py wrappers

查看:311
本文介绍了如何获得在f2py包装中花费多少时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在编写一个耗时的python程序,并决定在fortran中重写部分程序。但是,表现依然不佳。为了剖析目的,我想知道在 f2py 包装中花了多少时间以及fortran子例程中实际花费了多少时间。有没有一个方便的方法来实现这一目标?

I am currently writing a time consuming python program and decided to rewrite part of the program in fortran. However, the performance is still not good. For profiling purpose, I want to know how much time is spent in f2py wrappers and how much time is actual spent in fortran subroutines. Is there a convenient way to achieve this?

推荐答案

最后,我发现 -DF2PY_REPORT_ATEXIT 选项可以报告包装性能。

At last I found out -DF2PY_REPORT_ATEXIT option can report wrapper performance.

这篇关于如何获得在f2py包装中花费多少时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆