Skip to content

Comments

Fixed pch_fit_list[[1]] error and marginal gain in performance for fit_pch#10

Open
ibta wants to merge 4 commits intovitkl:masterfrom
ibta:master
Open

Fixed pch_fit_list[[1]] error and marginal gain in performance for fit_pch#10
ibta wants to merge 4 commits intovitkl:masterfrom
ibta:master

Conversation

@ibta
Copy link

@ibta ibta commented Jul 27, 2020

Hi!

I'm Ibta, a high school intern at the Broad Institute (also in Cambridge, but in Massachusetts, US, not the UK), and while trying to use multicore processing on Mac I ran into a couple of errors, specifically the one in the title. I ended up figuring out that I just had to change the cluster_type parameter, but this was after I figured out how to implement mclapply over parLapply. I tested this and one of the members of the lab I'm in also tested this on a couple of machines with different specs and found that there is only a marginal gain in performance (<10%), but it makes sure that people running UNIX based machines that have not been able to read the documentation can use multicore processing without having to mess with clust_options. It might also be useful for someone who is a power user and wants every percent of performance possible.

What I did to achieve this is that I added an if/else statement to the fit_pch.R file that checks for whether the operating system is UNIX based or not and will use mclapply instead of lapply or parLapply and will also make sure that the type is equal to m.

There is probably a way better solution to this and particularly because I am a high schooler and also because I am very new to R. The other solution that could be proposed is another flag under clust_options where it could look into whether parLapply should be used or mclapply.

@ibta ibta marked this pull request as ready for review July 27, 2020 01:41
@vitkl
Copy link
Owner

vitkl commented Dec 23, 2020

Sorry for a long delay on this. Thanks a lot for your interest and your contribution. I am unable to reproduce this error. I also mostly use UNIX rather than a mac. I will check the code over holidays. I see that you don't provide seed to mclapply, is this on purpose? Are you still working on this project?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants