-# cl = parallel::makeCluster(ncores_tasks)
-# parallel::clusterExport(cl, varlist=c("getSeries","getContribs","K1","K2",
-# "nb_series_per_chunk","ncores_clust","synchrones_file","sep","nbytes","endian"),
-# envir = environment())
- # 1000*K1 indices [if WER=="end"], or empty vector [if WER=="mix"] --> series on file
-# indices = unlist( parallel::parLapply(cl, indices_tasks, function(inds) {
- indices = unlist( lapply(indices_tasks, function(inds) {
-# require("epclust", quietly=TRUE)
-
- browser() #TODO: CONTINUE DEBUG HERE
-
- indices_medoids = clusteringTask(inds,getContribs,K1,nb_series_per_chunk,ncores_clust)
+ if (WER=="mix")
+ {synchrones_file = paste(bin_dir,"synchrones",sep="") ; unlink(synchrones_file)}
+ if (parll && ntasks>1)
+ {
+ cl = parallel::makeCluster(ncores_tasks)
+ varlist = c("getSeries","getContribs","K1","K2","verbose","parll",
+ "nb_series_per_chunk","ntasks","ncores_clust","sep","nbytes","endian")