Note: The following floating-point exceptions are signalling: IEEE_UNDERFLOW_FLAG IEEE_DENORMAL

主要原因是gfortron版本问题:

  • IEEE_INVALID_FLAG is triggered by invalid operations, such as trying to take sqrt(-1.0).

  • IEEE_DIVIDE_BY_ZERO is triggered when a number is divided by zero.

  • IEEE_UNDERFLOW_FLAG is triggered when the result of an expression underflows the precision of the variable being assigned the value.

  • IEEE_OVERFLOW_FLAG is triggered when the result of an expression exceeds the precision of the variable being assigned the value.

  • IEEE_DENORMAL is raised when denormal numbers have been generated.

网上查到:

I found a fix to disable this note by adding another flag for the compiler: 

-ffpe-summary='none'


The simulation finishes with no warnings.

尝试直接给gfortron降级来解决问题:

更改gcc默认版本(gcc版本降级/升级)

当时装显卡驱动的时候把默认的gcc5.5降到了4.8,现在用darknet的时候需要调回来,幸亏当时收藏了这篇。

可以让系统存在两个gcc版本,4.8和6.2,但是默认的gcc版本为4.8(编译老的项目,直接make).而更高的版本6.2则可以留着供自己平时指定使用.

按照如下步骤即可:

(1)在Ubuntu 16.04上安装老版gcc十分简单,直接用apt-get命令下载即可。

sudo apt-get install gcc-4.8

安装完成后输入命令gcc --verison查看gcc的版本,此时还是6.2。
(2)设置gcc的默认版本。
设置之前可以先输入命令ls /usr/bin/gcc* 查看gcc 4.8版本是否安装成功。
然后输入下面的命令设置默认版本:

sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 100


最后的数字为优先级(越大越高),因为只有一个4.8版本作为alternatives,可以不要纠结数字,这样设就行了
(3)然后可以输入以下命令查看设置结果(非必须)

sudo update-alternatives --config gcc

因为只设置了一个,所以显示结果为:"链接组 gcc (提供 /usr/bin/gcc)中只有一个候选项:/usr/bin/gcc-4.8
无需配置.",如果有多个则会显示一个按优先级的列表.
(4)最后再次输入命令gcc -version查看gcc的版本已经变成4.8啦...就成功啦.
现在默认版本已经是4.8版本,如果想用6.2版本,则gcc-6.2 这样指定就好啦
g++ 等其他软件也是这样设置进行版本升级/降级.

ps:

(1)当以上设置不需要的时候输入以下命令删除:

sudo update-alternatives --remove gcc /usr/bin/gcc-4.8

(2)当时设置g++的时候,命令复制的太快,导致没有将gcc全部替换掉,变成这样

sudo update-alternatives --install /usr/bin/g++ gcc /usr/bin/g++-4.8 

导致g++链接到了gcc.当时怎么也修复不好,上面的--remove命令也无效,...别急,只要将gcc设置的那个命令重新设置一下,然后再重新设置g++就好了.Linux下输入命令要小心,不然有的真的不知道怎么恢复.
--------------------- 
原文:https://blog.csdn.net/qq_31175231/article/details/77774971 
 

发布了25 篇原创文章 · 获赞 7 · 访问量 2787

猜你喜欢

转载自blog.csdn.net/SDAU_LY124/article/details/104479508