[R] Multithreading of Geneland

From: Aurélien Chateigner <aurelien.chateigner_at_googlemail.com>
Date: Mon, 04 Apr 2011 17:35:52 +0200


Hi all,

I would like to multithread that script, to detect structure from multilocus genetic data :

>library(Geneland)
>
>geno = read.table("cot966gen_test.txt") #the file is show after
>MCMC(geno.dip.codom = geno, varnpop=T, npopmax=20, spatial = F, nit=100000, thinnin=100, path.mcmc="./")
>PostProcessChain(path.mcmc="./", nxdom=100, nydom=100, burnin=200)

I have an 8 cores computer, and since I have to compute that bit on a thousand of line like that :

209	209	217	217	180	180	154	154	181	181	192	192	-9	-9	211	211	-9	-9	160	160	-9	-9
-9	-9	-9	-9	254	254	140	140	181	181	-9	-9	-9	-9	211	211	158	158	160	160	158	146
209	209	223	223	348	348	186	186	-9	-9	-9	-9	-9	-9	-9	-9	-9	-9	154	154	146	146
212	212	291	291	218	218	170	170	187	187	194	194	190	190	214	208	152	152	158	158	155	155
209	209	-9	-9	180	180	150	150	185	185	-9	-9	-9	-9	211	211	152	152	-9	-9	155	155
212	212	209	209	234	234	166	166	187	187	-9	-9	-9	-9	-9	-9	-9	-9	-9	-9	-9	-9
212	212	205	205	236	236	164	164	187	187	194	194	183	183	214	214	163	163	160	160	155	155
212	212	203	203	238	236	164	164	187	187	-9	-9	179	179	-9	-9	-9	-9	-9	-9	-9	-9
212	212	203	203	236	236	164	164	187	187	194	194	-9	-9	214	214	165	165	160	160	155	155
212	212	209	209	236	234	164	164	187	187	194	194	179	179	-9	-9	-9	-9	-9	-9	-9	-9
212	212	205	205	236	236	166	166	-9	-9	-9	-9	-9	-9	-9	-9	-9	-9	-9	-9	-9	-9
212	212	-9	-9	180	180	147	147	181	181	-9	-9	-9	-9	-9	-9	-9	-9	-9	-9	-9	-9
212	212	-9	-9	180	180	147	147	181	181	198	198	-9	-9	-9	-9	-9	-9	-9	-9	-9	-9
212	212	209	209	234	234	166	166	187	187	-9	-9	-9	-9	-9	-9	-9	-9	-9	-9	-9	-9
212	212	209	209	234	234	166	166	187	187	-9	-9	-9	-9	-9	-9	-9	-9	-9	-9	-9	-9
212	212	209	209	236	236	166	166	187	187	194	194	-9	-9	-9	-9	-9	-9	-9	-9	-9	-9
212	212	207	207	236	236	164	164	-9	-9	194	194	-9	-9	-9	-9	-9	-9	-9	-9	-9	-9
212	212	205	205	238	238	164	164	187	187	-9	-9	-9	-9	-9	-9	-9	-9	160	160	155	155
212	212	209	207	234	234	164	164	187	187	194	194	183	183	-9	-9	-9	-9	-9	-9	-9	-9
-9	-9	-9	-9	-9	-9	166	166	-9	-9	194	194	183	183	-9	-9	-9	-9	-9	-9	-9	-9
212	212	209	205	234	234	164	164	187	187	194	194	179	179	214	214	165	165	160	160	155	155
212	212	205	205	234	234	164	164	187	187	194	194	183	183	214	214	163	163	160	160	155	155
212	212	209	209	236	236	166	166	187	187	194	194	-9	-9	-9	-9	-9	-9	-9	-9	-9	-9
212	209	-9	-9	180	180	150	147	187	187	-9	-9	-9	-9	211	211	158	154	-9	-9	155	155
209	209	207	207	328	328	184	184	181	181	-9	-9	-9	-9	211	211	165	165	-9	-9	155	155
212	212	253	253	212	212	168	150	187	181	-9	-9	-9	-9	208	208	160	160	-9	-9	155	146
212	212	-9	-9	230	224	178	178	193	193	194	194	-9	-9	208	208	158	158	160	158	155	155
212	212	-9	-9	232	224	150	150	197	189	-9	-9	-9	-9	208	208	160	160	158	158	155	155
209	209	219	215	194	194	162	162	193	193	192	192	161	161	208	208	163	160	154	154	155	146
212	212	251	251	222	222	164	164	183	183	194	194	-9	-9	208	208	160	160	158	158	155	155
-9	-9	293	251	-9	-9	-9	-9	195	195	192	192	-9	-9	-9	-9	-9	-9	154	154	146	146
212	212	293	249	232	212	178	176	183	183	-9	-9	-9	-9	208	208	156	152	158	158	155	155
209	209	217	197	256	192	160	160	189	183	192	192	-9	-9	208	208	-9	-9	154	154	155	146
209	209	223	197	238	200	206	206	183	183	-9	-9	198	198	208	208	165	165	154	154	155	146
212	212	249	249	218	218	-9	-9	183	183	194	194	190	169	-9	-9	-9	-9	-9	-9	155	146
212	212	-9	-9	224	224	164	164	193	193	-9	-9	-9	-9	208	208	165	160	158	158	155	146
209	209	217	213	304	212	182	182	195	195	192	192	-9	-9	208	208	165	165	154	154	155	146
209	209	238	219	266	248	188	188	183	183	192	192	-9	-9	-9	-9	-9	-9	-9	-9	146	146
209	209	243	223	254	200	162	162	183	183	192	192	-9	-9	-9	-9	-9	-9	154	154	146	146
212	212	247	247	228	224	210	210	183	183	-9	-9	-9	-9	208	208	158	158	158	158	155	155

It will take a while. So I want to multithread all that, but I don't know how. I read things on the multicore package, but I don't know how to use it here, or snow packages, so I would really appreciate a bit of help... So, does anyone know about Geneland and multithreading ?

Thanks,

Aurélien Chateigner
PhD Student
Institut de Recherche sur la Biologie de l'Insecte UMR CNRS 6035
Université François Rabelais de Tours
Faculté des Sciences et Techniques
Avenue Monge - Parc Grandmont
37200 TOURS (FRANCE) http://irbi.univ-tours.fr/
aurelien.chateigner_at_gmail.com

Phone: 	+33 (0)2 47 36 73 83
		+33 (0)6 84 88 72 91




	[[alternative HTML version deleted]]


______________________________________________

R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Mon 04 Apr 2011 - 15:56:15 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 04 Apr 2011 - 16:10:26 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive