|
这取决于你的debug和release里面都用了编译器的哪些flag,如果用了一些比较激进的优化类flag编译器是会改写你的代码从出错的。比如说gfortran的"-ffast-math",官方文档里是这样写的“This option is not turned on by any -O option besides -Ofast since it can result in incorrect output for programs that depend on an exact implementation of IEEE or ISO rules/specifications for math functions.”所以这可能不仅仅是调用模块的问题,如果你要确保你的程序在一个比较激进的flag下也能得到正确的结果,你可能要在算法上检查一下。Intel的编译器我不算特别熟,但是类似的问题也会发生的,你可以参考一下这个intel社区的帖子。 |
|