Running examples in 'ParallelPC-Ex.R' failed
The error most likely occurred in:

> ### Name: pcSelect_parallel
> ### Title: Estimate subgraph around a response variable using
> ###   pcSelect_parallel.
> ### Aliases: pcSelect_parallel
> 
> ### ** Examples
> 
> ##########################################
> ## Using pcSelect_parallel without mem.efficeient
> ##########################################
> library(pcalg)
> library(parallel)
> p <- 10
> set.seed(101)
> myDAG <- randomDAG(p, prob = 0.2)
> n <- 1000
> d.mat <- rmvDAG(n, myDAG, errDist = "normal")
> pcSelect_parallel(d.mat[,10],d.mat[,-10], alpha=0.05,num_workers=2)
[1] "----------in the pc_select_parallel myself's----------"
[1] "vNms = "
[1] "1" "2" "3" "4" "5" "6" "7" "8" "9"
[1] "parallel prepare cost time:"
Time difference of 4.6526 secs
[1] "parallel perpare finished."
[1] "-----pepare to parallel------"
[1] "windows"
l-j+1 = : 3 parallel_threshold is : 4[1] "*** system ***"
l-j+1 = : 1 parallel_threshold is : 4[1] "*** system ***"
[1] "parallel calculate cost:"
Time difference of 0.0624001 secs
Num CI Tests= 9 5 0 ,Total CI Tests= 14 ,Total Time= 0.06 
total is : 0.01 0 0.06 NA NA 
cost time 1: 0 cost time 2: 4.6526 
$G
    1     2     3     4     5     6     7     8     9 
 TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE 

$zMin
[1] 22.9033359  1.5887361  0.3651365  0.9486830  1.1659037  0.3093951  0.4242963
[8]  1.7033711  1.0137022

> 
> ##########################################
> ## Using pcSelelct_parallel with mem.efficeient
> ##########################################
> library(pcalg)
> library(parallel)
> p <- 10
> set.seed(101)
> myDAG <- randomDAG(p, prob = 0.2)
> n <- 1000
> d.mat <- rmvDAG(n, myDAG, errDist = "normal")
> pcSelect_parallel(d.mat[,10],d.mat[,-10], alpha=0.05,mem.efficient=TRUE,num_workers=2)
[1] "----------in the pc_select_parallel myself's----------"
[1] "vNms = "
[1] "1" "2" "3" "4" "5" "6" "7" "8" "9"
[1] "parallel prepare cost time:"
Time difference of 4.2588 secs
[1] "parallel perpare finished."
[1] "-----pepare to parallel------"
[1] "windows"
l-j+1 = : 3 parallel_threshold is : 4[1] "*** system ***"
l-j+1 = : 1 parallel_threshold is : 4[1] "*** system ***"
[1] "parallel calculate cost:"
Time difference of 0.04680014 secs
Num CI Tests= 9 5 0 ,Total CI Tests= 14 ,Total Time= 0.05 
total is : 0 0 0.05 NA NA 
cost time 1: 0 cost time 2: 4.2588 
$G
    1     2     3     4     5     6     7     8     9 
 TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE 

$zMin
[1] 22.9033359  1.5887361  0.3651365  0.9486830  1.1659037  0.3093951  0.4242963
[8]  1.7033711  1.0137022

> 
> 
> 
> cleanEx()

detaching 'package:parallel', 'package:pcalg'

Error: connections left open:
	<-CRANwin.fb05.statistik.uni-dortmund.de:11354 (sockconn)
	<-CRANwin.fb05.statistik.uni-dortmund.de:11354 (sockconn)
	<-CRANwin.fb05.statistik.uni-dortmund.de:11354 (sockconn)
	<-CRANwin.fb05.statistik.uni-dortmund.de:11354 (sockconn)
Execution halted