Closed MuBulut closed 1 year ago
I usually check that the scripts are properly parallelized via a monitoring tool (e.g. top
). can you show me the OS and R version, and the script?
Top is exactly the tool I used and realized, the load is never more than 1 and only 1 thread seems to be running. OS: Ubuntu Linux 20.04 R: 4.1.2
the script:
library("rMVP") library("bigmemory")
setwd("/data/adonut/testdata")
options(bitmapType="cairo")
MVP.Data(fileVCF = "SNP.vcf", sep.vcf="\t", sep.phe="\t", filePhe = "all_traits_phenotype_log_rMVP.txt", out="mvp")
MVP.Data.Kin(TRUE, mvp_prefix = 'mvp', out = 'mvp', priority = "speed", sep = "\t")
MVP.Data.PC(TRUE, mvp_prefix = 'mvp', pcs.keep = 5, sep = "\t", priority = "speed" ) #play around with settings
genotype <- attach.big.matrix('mvp.geno.desc') phenotype <- read.table("mvp.phe", header = TRUE) #at which step should I prepare this??? kinship <- attach.big.matrix('mvp.kin.desc') map <- read.table("mvp.geno.map" , head = TRUE)
for(i in 2:ncol(phenotype)){ imMVP <- MVP( phe = phenotype[, c(1, i)], #phenotype data geno = genotype, #genotype data K = kinship, map = map, #mapping data --> i dont have it since i use vcf-files
nPC.MLM=3, nPC.FarmCPU=3, priority="speed", ncpus=50, vc.method="HE", #"BRENT", "EMMA", and "GEMMA" maxLoop=10, #maximum iterations allowed in FarmCPU method.bin="FaST-LMM", #"FaST-LMM","EMMA", "static"
#95% quantile value of this vector is recommended to be used as significant threshold
threshold=c(0.5, 0.05), #0.05/marker size, a cutoff line on manhattan plot
method=c("MLM", "GLM", "FarmCPU") #are there more? --> no )
gc() }
There is a line like this in MVP's log output
Number of threads used: <threads>
Can you check the number here?
I guess it may be that the OpenMP environment is abnormal or the use of threads is restricted by the system level
Hi
I have question concerning the ncpus option: Whenever I start my R-script (on a multi core) machine, it seems, that there is never more than 1 cpu utilized, The load is always around 1 with one thread at 100%.
I tried to specify ncpus=10 and also commenting out the option (which would mean all cores found should be used, right?), but could not see any change in behaviour.
Could you please comment on how to make sure (and check), that more than one cpu is used by rMVP?