take forever to run

30 views
Skip to first unread message

Sophie

unread,
Sep 2, 2013, 10:02:38 AM9/2/13
to seg...@googlegroups.com
Hi Everyone, 

I'm new to Segue. I started my first try recently. However my code seems take just too long to run. Using my own computer to do the same task (4 individual tasks, so each individual one takes 40 min) without parallel takes approximately 160 min. I use 2 c1.medium instances and after 4 hours it's still running! I really don't know what is the problem and where I can check. Does anyone know what is the problem here?  I'll highly appreciate any help and comments!!!

Thanks,
Sophie

------------------ Here is my setup -------------------
setCredentials("XXX", "XXX")
myCluster <- createCluster(numInstances=2, 
                           cranPackages=c("randtoolbox"), 
                           enableDebugging=FALSE,
                           masterInstanceType="c1.medium", 
                           slaveInstanceType="c1.medium", 
                           location="us-east-1a", 
                           copy.image=FALSE)

myEstimates <- emrlapply( myCluster, dataList, myFunction, taskTimeout=120)
(in the task I mentioned above, I put only 4 elements in the dataList)


------------------------  output ---------------------------------

RUNNING - 2013-09-02 05:03:57

...

RUNNING - 2013-09-02 09:21:15

------------- and then I just terminated it, and got the following info from my Rstudio ------------------------

FAILED - 2013-09-02 09:21:46

Error in file(paste(myTempDirOut, "/combinedOutput.csv", sep = ""), "w") :

  cannot open the connection

In addition: Warning message:

In file(paste(myTempDirOut, "/combinedOutput.csv", sep = ""), "w") :

  cannot open file '/var/folders/VV/VVuP3D87HpqJreUa2MMVf++++TI/-Tmp-//Rtmpj33vBGy5cu1hst2w-segue/out/results/combinedOutput.csv': No such file or directory








James Long

unread,
Sep 2, 2013, 4:08:32 PM9/2/13
to seg...@googlegroups.com, seg...@googlegroups.com
Hey Sophie. How big is your data (dataList), and how fast is you Internet upload speed? If you have to shove a lot of data up to Amazon that can take a while. 

-JD
--
You received this message because you are subscribed to the Google Groups "Segue for R" group.
To unsubscribe from this group and stop receiving emails from it, send an email to segue-r+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Sophie

unread,
Sep 3, 2013, 2:59:01 PM9/3/13
to seg...@googlegroups.com
Hi JD,

Thanks for replying so fast! My dataList is 8 Mb and my internet upload speed is up to 1Mbps. I'm doing bootstraping. Would it be better if I upload the original dataset to all nodes once using rObjectsOnNodes = c('data_ori'), and use seedList to generate bootstrap sample, instead of uploading all the bootstrap sample i.e., dataList? I guess that could avoid the uploading speed problem?

Also I completely don't know how the EMR works so I just realized that my problem is that I should have used more numInstances. If numInstances=2, then 1 instance is the master instance and I only have 1 working instance (slave instance), which can really slow things down. I can't believe I'm so ignorant...

I have a few more question. Estimating my model once (i.e., run myFunction once) cost 3 hours in my computer, and I need to do 300-500 bootstrap. So I guess I really need to use high CPU performance instances. But I'm very confused by the "vCPU" concept and also the "instancePerNode" in segue package. 
1) if I specify "instancePerNode = 1", then only one vCPU in each instance is working? 
2) If I use some instance with a lot vCPU (e.g., c1.xlarge has 8vCPU), I should definitely set  "instancePerNode = 8" so that everybody of the 8 CPU in one         c1.xlarge instance will work right? Is the "instancePerNode" kind of the multicore parrallelizing idea in our own computer? 
3) Is using one instance with 8 vCPU equivalent to use 8 instances each with only 1 vCPU? 
4) If run myFunction once cost 3 hours in my computer, should I set "taskTimeout = more than 3 hours", so that my work will definitely not be stopped?

Sorry to bother everybody with my silly questions. I hope my questions will be helpful to people similar to me (without any computer science knowledge but have to do a huge embarrassingly parallel!) I highly appreciate segue package and helps from this group!

Best,
Sophie
Reply all
Reply to author
Forward
0 new messages