各位大佬好,医学生小白求助julia如何实现并行运算

最近在使用github上用julia编写的一个程序,详见GitHub - jordiabante/CpelAsm.jl: Julia module to perform haplotype allele-specific DNA methylation analysis.
我使用该程序的运行代码如下

using CpelAsm
b1 = "/public/home/sjbxzpf/test/h1.bam"
b2 = "/public/home/sjbxzpf/test/h2.bam"
fa = "/public/home/sjbxzpf/test/merged.fa"
vcf = "/public/home/sjbxzpf/test/GSM1204461_1.vcf"
out = "/public/home/sjbxzpf/test/out/"

run_analysis(b1, b2, b1, vcf, fa, out; win_exp=10, n_null=1000, cov_ths=5) 

作者在论文原文中提到

“Note, however, that the clear superiority of the CPEL method over existing methods comes at a substantial computational cost (it took about 48 hours using 20 CPUs to process one WGBS sample in the real data), which necessitates the use of parallel processing using a computer cluster.”

并且我看到这个程序用到了

using Distributed               # For parallelization
using SharedArrays              # For parallelization

那么我该怎么实现并行计算呢,感谢!

https://docs.julialang.org/en/v1/manual/distributed-computing/

有服务器的话参考上面的配置,它这个20个CPU还是20核不是很清楚。没服务器的话直接跑也能跑

1 个赞

感谢,我这就去试一下