rietho / IPO

A Tool for automated Optimization of XCMS Parameters
http://bioconductor.org/packages/IPO/
Other
34 stars 20 forks source link

MakeCluster(nSlaves, type = "PSOCK") #28

Closed tobigithub closed 8 years ago

tobigithub commented 8 years ago

Hi, under WINDOWS7 I uninstalled Rmpi and only use snow now. IPO fires up, but after the first optimization round it breaks. BTW this was a tested and working version. Central Carbon Metabolism was the script I used. SO first round is OK and this is the second DoE round, I guess everything is fine in the first round, then in the second round something happens.

Why would IPO built use makeCluster(nSlaves, type = "PSOCK") in the second round, but not in the first round?

starting new DoE with:
min_peakwidth:  c(12, 28)       max_peakwidth:  c(35, 65)       ppm:    c(17, 32)       mzdiff: c(-0.001, 0.01) snthresh:       10      noise:  0       prefilter:      3       value_of_prefilter:     100     mzCenterFun:    wMean   integrate:      1       fitgauss:       FALSE   verbose.columns:        FALSE   nSlaves:        1       

 Starting snow cluster with 32 local sockets.
Detecting features in file # 1 : 1_QC.mzXML 
Detecting features in file # 2 : 2_QC.mzXML 
Detecting features in file # 3 : 3_QC.mzXML 
Detecting features in file # 4 : 4_QC.mzXML 
Detecting features in file # 5 : 5_QC.mzXML 
Detecting features in file # 6 : 6_QC.mzXML 

starting new DoE with:
min_peakwidth:  c(4, 20)        max_peakwidth:  c(35, 59)       ppm:    c(9.5, 24.5)    mzdiff: c(0.00175, 0.01275)     snthresh:       10      noise:  0       prefilter:      3       value_of_prefilter:     100     mzCenterFun:    wMean   integrate:      1       fitgauss:       FALSE   verbose.columns:        FALSE   nSlaves:        1       
Error in makeCluster(nSlaves, type = "PSOCK") : unknown cluster type
In addition: Warning messages:
1: package ‘Rcpp’ was built under R version 3.1.3 
2: In fun(libname, pkgname) :
  mzR has been built against a different Rcpp version (0.11.3)
than is installed on your system (0.12.0). This might lead to errors
when loading mzR. If you encounter such issues, please send a report,
including the output of sessionInfo() to the Bioc mailing list at 
http://www.bioconductor.org/help/mailing-list. For details see also
https://github.com/sneumann/mzR/wiki/mzR-Rcpp-compiler-linker-issue.
3: package ‘rsm’ was built under R version 3.1.3 
4: package ‘igraph’ was built under R version 3.1.3 
5: replacing previous import by ‘igraph::groups’ when loading ‘CAMERA’ 
Timing stopped at: 6.26 1.25 546.46 
> 

T

M-R-JONES commented 8 years ago

I recently closed a similar issue. After re-install, I thought all was good - turns out I was wrong. I have the same issue in that I can get the optimisation to work once only, followed by "Error in makeCluster(nSlaves, type = "PSOCK") : unknown cluster type".

OS: Windows 7 R version 3.2.2 Latest IPO builds + latest depencies.

glibiseller commented 8 years ago

Hi,

Thanks Tobias and M-R-JONES. I think I now understand better where the problem comes from:

The snow clusters are started by xcmsSet when calculating the xcmsSet-object with the best parameter settings found within the last DoE. But IPO uses "PSOCK"-clusters.

There are two similar but different makeCluster-functions. One from the package 'snow' and one from 'parallel'. Using snow::makeCluster(1, type="PSOCK") results in an error.

Therefore i preceded the functions 'makeCluster', 'clusterExport', 'parSapply' and 'stopCluster' with 'parallel::' and uploaded a new version.

Could you try it and tell me if the changes helped?

Cheers, Gunnar

tobigithub commented 8 years ago

Hi, I used the lipidomics benchmark from the WIKI "myIPOSet2 <- function ()" and got the same output,

starting new DoE with:
min_peakwidth: c(12, 28)
max_peakwidth: c(35, 65)
ppm: c(17, 32)
mzdiff: c(-0.001, 0.01)
snthresh: 10
noise: 0
prefilter: 3
value_of_prefilter: 100
mzCenterFun: wMean
integrate: 1
fitgauss: FALSE
verbose.columns: FALSE
nSlaves: 1

Error in mpi.spawn.Rslaves(nslaves = nSlaves, needlog = FALSE) : 
  Spawning is not implemented. Please use mpiexec with Rprofile.
In addition: Warning messages:
1: package ‘Rcpp’ was built under R version 3.1.3 
2: In fun(libname, pkgname) :
  mzR has been built against a different Rcpp version (0.11.3)
than is installed on your system (0.12.0). This might lead to errors
when loading mzR. If you encounter such issues, please send a report,
including the output of sessionInfo() to the Bioc mailing list at 
http://www.bioconductor.org/help/mailing-list. For details see also
https://github.com/sneumann/mzR/wiki/mzR-Rcpp-compiler-linker-issue.
3: package ‘rsm’ was built under R version 3.1.3 
4: package ‘igraph’ was built under R version 3.1.3 
5: replacing previous import by ‘igraph::groups’ when loading ‘CAMERA’ 
Timing stopped at: 3.85 0.36 1098.55 
> 
> 
> ### [1] "Finished. Thank you for using IPO."
> ###    user   system  elapsed 
> ### 4577.88   2253.56 16310.44 
> ### 1h:16 min 37 min  4h:32 min
> 
> ### ***********************************************************************
> ### function finished
> ### ***********************************************************************

I guess its just that Rmpi function. I also get GUI window pop-ups if mpich is not installed, but that is an "unrelated" xcms issue under windows. Cheers Tobias

glibiseller commented 8 years ago

Looks like the parallelization problem within IPO is fixed now, therefore I'm closing this issue.

Thanks for your help

tobigithub commented 8 years ago

Hi, thanks for the fix, still need to redo the examples. Tobias