Question: Error message running admixture in WSL (Ubuntu) : Segmentation fault (core dumped)
gravatar for k.prata
19 months ago by
k.prata0 wrote:


I am using Ubuntu on Windows Subsystem for Linux. I download the program "Admixture" (for population structure analyses using NextRAD SNP data) in my Ubuntu home directory and access the admixture executable from this directory to run the analysis. I have also tried to access it from a conda environment after installing admixture using "conda install admixture".

I get this error message:

Segmentation fault (core dumped)

I have tried many different methods to prepare my data using different programs and methods: vcftools (vcf to ped and map) then using plink to create bed bim and fam or just straight vcf to bed bim and fam and don't believe my issue is to do with the format of my data.

If anyone has encountered this issue and has solved it, I would be eternally grateful as I have been dealing with this issue for a while now!

I have also emailed the developers and if I get a solution I will be happy to provide here.

Regards, Kat

snp admixture software error • 2.0k views
ADD COMMENTlink modified 13 months ago by ndiaz0 • written 19 months ago by k.prata0

A segmentation fault is often caused by a lack of memory. have a look at what the output of running the analysis with time -v in front is.


time is a bash keyword. To get a version of time that supports the -v switch, you'll need to use the one that is install as part of GNU. You can generally find this with which time e.g.

$ time -v echo hello
-v: command not found

real    0m1.447s
user    0m0.031s
sys     0m0.078s
$ which time
$ /usr/bin/time -v echo hello
    Command being timed: "echo hello"
    User time (seconds): 0.00
    System time (seconds): 0.00
    Percent of CPU this job got: 0%
    Elapsed (wall clock) time (h:mm:ss or m:ss): 0:00.01
    Average shared text size (kbytes): 0
    Average unshared data size (kbytes): 0
    Average stack size (kbytes): 0
    Average total size (kbytes): 0
    Maximum resident set size (kbytes): 796
    Average resident set size (kbytes): 0
    Major (requiring I/O) page faults: 0
    Minor (reclaiming a frame) page faults: 229
    Voluntary context switches: 0
    Involuntary context switches: 0
    Swaps: 0
    File system inputs: 0
    File system outputs: 0
    Socket messages sent: 0
    Socket messages received: 0
    Signals delivered: 0
    Page size (bytes): 4096
    Exit status: 0

You want to look at Maximum resident set size (kbytes)

ADD REPLYlink modified 19 months ago • written 19 months ago by i.sudbery11k

i.sudbery is time -v specific for WSL? I tried it, because it could be useful for me, but it resulted in printing the time and the error: bash: -v: command not found. What can the problem be?

ADD REPLYlink written 19 months ago by Fabio Marroni2.7k

Sorry, time is also a bash keyword, as well as a GNU Util. On bash you need to specify the full path to the executable. So for example /usr/bin/time -v echo hello

I'll update my answer above.

ADD REPLYlink written 19 months ago by i.sudbery11k

A test that I usually perform is to run the command with a very small dataset and check if the problem persist. If it persists, then it might be some problem with data format.

ADD REPLYlink written 19 months ago by Fabio Marroni2.7k

Did this get resolved? I am running into the exact same issue and am out of ideas for solutions.

ADD REPLYlink written 18 months ago by bryson.sjodin10

Hi, I am having the same problem. Did anybody solve the problem? Thank you Giulia

ADD REPLYlink written 15 months ago by g.frascarelli10

1) did anybody try to inspect the memory usage as suggested by i.sudbery? What was the result? 2) did anybody try to run the same command on a reduced dataset? What was the result? 3) Admixture comes with a toy dataset ( Did anybody try to use that? What was the outcome?

Without answer to at least some of these questions it is very hard to help.

ADD REPLYlink written 15 months ago by Fabio Marroni2.7k

I tried all of these steps, all resulted in the same error message. It is definitely not a memory issue, I have gotten the software to run via Virtual Box with Ubuntu, it appears to be a specifically WSL problem.

ADD REPLYlink written 15 months ago by bryson.sjodin10

I am afraid I cannot help then, I know nothing about WSL.

ADD REPLYlink written 15 months ago by Fabio Marroni2.7k

Tried everything as well. I have now moved to doing this analysis on my Mac computer.

ADD REPLYlink written 15 months ago by k.prata0

So i tried switching to my mac and I still get the exact same error. Am I missing something?

ADD REPLYlink modified 7 months ago • written 7 months ago by rditt0030

It is not a out of memory issue. Removing all non-numeric characters from the contig names in the vcf helped in my case.

ADD REPLYlink written 8 months ago by pascal10
gravatar for ndiaz
13 months ago by
ndiaz0 wrote:


I was having the same problem. I was using denovo assembled data, therefore, bp positions of my SNPs within "chromosomes" (4th column of the plink map file) were artiifical positions assessed by stacks software after appending all the catalog tags.

I thought the problem with admixture was having problems with the SNPs location (aritificially too close to each others), the typicall 100bp block size, and the number of SNPs within it resamples for bootstrap.

I resolved the problem assigning to my SNPs sucesive positions separated by 100,000 bp: using just one SNP per tag I assumed my SNPs were independent (not bias from LD). I just modified the 4th column of my *map file. When using a typical ca. 10,000 SNP datasets that resolved the problem.

Then I realized that when using an smalled dataset (ca. 100 SNPs) I need to increase this "artificial distance" between SNPs. I don't fully understand why should this happend. I guess is because you need total distance between SNPs to be big enough as to perform the bootstrapping? If anyone can shed light into this problem I would appreciate it.

I hope it helps.

ADD COMMENTlink modified 13 months ago • written 13 months ago by ndiaz0
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1460 users visited in the last hour