blupf90报错整理

整理使用 blupf90 过程中的报错信息。

段错误吐核报错(Segmentation Fault(core dump))

原因和解决方案见官方文档,网址如下:

http://nce.ads.uga.edu/wiki/doku.php?id=faq.segfault

segfault一般发生在使用大数据集或者使用更新的程序。如果程序中止却没有任何信息,很有可能已经发生了segfault

可能的原因是

  • Missing configuration in your computing environment
  • Running out of free memory
  • A bug in the program

所以,第一是看自己的设置,第二看内存,第三才是才是看是不是软件的问题

第一步,linux 设置

Stack size

在shell 中输入命令ulimit -s ,如果显示一个数字(8192),那么这可能就是一个问题,需要按如下设定(设置用户可以使用的内存区域)。

1
ulimit -s unlimited

具体解释参考下方链接

https://blog.csdn.net/sunboy_2050/article/details/8589168

OpenMP stack size

先 echo $OMP_STACKSIZE 如果是空或者4M,那就有问题

按下方的命令设置

1
export OMP_STACKSIZE=64M

如果你只想暂时的改变这个值的大小,可以在命令前输入

1
OMP_STACKSIZE=64M ./airemlf90 

It defines the stack size but for OpenMP library for parallel computing. This value is independent of the system stack size.

可以把这些设置放到./bashrc文件或 .bash_profile里,这两个文件都是一打开shell就自动执行的,因此会自动设置好。

我的设置内容如下:

1
2
3
4
5
ulimit -s unlimited
ulimit -u 65535
ulimit -n 4096
export OMP_STACKSIZE=64M
export LANG=en_US.UTF-8 #language

第二步,看内存空间

另一个原因是内存不够用了。(但是这种一般报错insufficient memeory)

第三步,向blupf90提交bug

前面都没问题,那就可能是个bug。你可以这个网址找到联系方式上传邮件。

https://groups.io/g/blupf90

具体解释

Our software tries to produce the maximum performance in speed in exchange for a bit more memory. There are 2 types of memory-allocation strategies in your system: stack and heap (see https://stackoverflow.com/questions/79923/what-and-where-are-the-stack-and-heap). Stack memory is much faster than heap but its size is usually limited by system. Even though you have plenty of physical memory, the stack size is small by default. Heap can use all of memory in your system but it is slower than stack because of more complicated memory-management strategy. Our program aggressively uses stack than heap to improve the speed, so the stack size should be large (or unlimited).

这段话的意思是最新的blupf90程序为了提高速度需要占用更多的内存。目前有两种内存关联的策略,stack 和 heap 。stack速度快但是大小受限,heap可以用所有的内存但是速度慢。这里程序主要用stack 策略来提高速度,因此需要更大的stack size。

创建A22阵报错(系谱loop)

首先说一下数据情况,5百多基因型,只有一半有系谱,基本有表型。

使用 renumf90 时没有问题,使用 blupf90 进行一步法分析时,遇到的报错如下

1
2
3
4
5
Creating A22 
Ancestors of genotyped can not be extracted 584 586
Check YOB between progeny and parents
And check *all* the sire_id and dam_id appear in the 1st column
in the pedigree file.

最终检查发现是系谱数据存在 loop 现象,即个体追系谱可以追到它自己本身,解决这个问题就可以正常运行了。

但是我用 blupf90 进行常规评估时没有报错,这也是一个问题 ,说明 blupf90 在做常规评估时没有检查系谱 loop 问题。

G not positive definite

使用 blupf90 模块进行候选群评估,发现所有个体育种值全是0,其日志信息没有报错,但是提示如下:

1
2
3
4
5
6
7
Data record length =            5
# equations = 2568
G not positive definite: fixed
G
0.10000E-17
G
0.16805

这里提示方差组分不正定,由于这里是单性状评估,每个随机因子只有一个方差组分的值,因此也就是说方差组分小于等于 0。

但是这里的方差组分 0.10000E-17 虽然很小,但是并不等于0,我估计应该是由于数据的精度问题,使得 blupf90 将 0.10000E-17 视为 0 ,从而引发不正定的问题,使得结果全部是 0 。

所以之后遇到这种方差组分特别小(接近于0)的情况,必须得剔除这个随机因子。

SNP位点数目过多

如果SNP位点数目过多,也会报错,默认最多 40万位点

1
Number of SNPs greater than "maxsnp": 400000, or error in reading SNP file

可以通过设置以下选项设置最大位点数目

1
OPTION maxsnp 13189365
  • 版权声明: 本博客所有文章除特别声明外,著作权归作者所有。转载请注明出处!
  • Copyrights © 2019-2025 Vincere Zhou
  • 访问人数: | 浏览次数:

请我喝杯茶吧~

支付宝
微信