-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Best way to paralellize Circuitscape? #236
Comments
Use Julia's parallelization with |
A |
@ViralBShah @vlandau I appreciate the quick reply. I will make an attempt and reopen if I run into issues. |
I'll be curious to know how both options fair. Remember to set number of blas threads to 1. |
Good call. I do the same thing in Omniscape, and it helps with performance. |
This might be a little over my head. Could you explain further what that means and how to do it? |
BLAS is "basic linear algebra subprograms", and they do linear algebra in parallel using multithreading. If you are doing higher level parallelization, where each job is itself using BLAS, then you can get "oversubscription," which is basically having more work queued up to do than you have hardware resources. This causes a competition for resources that can have consequences for performance. Setting BLAS number of threads to 1 prevents this from happening. The link in my comment above shows the code to do that. |
Reopening this issue as I am having some troubles...
This code lauches multiple processes, equal to
Then, the function get hang (
Changing this FWIW, I also tried :
and do not get the same behavior, only one process starts before getting hung. Also, the following for loop does work fine, so it is not an issue with my ini files:
|
Ah - The parallelization inside circuitscape is interfering with the parallelization that you want to do. The right way to address this is with multi-threading which is composable - but we are having some issues there at the moment (#230). For now, changing the I am not sure - but I also believe that if you start Julia with one processor, and literally just do |
Would love to contribute but unsure what you mean by the "appropriate INI option".
Thanks, will give it a try. |
I think we can check the configuration parameter Line 36 in 2d44a41
|
I see, but I cant see how to use I see this setting is used here to add workers that will then be used by Lines 67 to 72 in c525971
So the parallelize parameter is for parallelizing at the level of the pairs, not the higher level. It is false by default.
Does that mean we need to default
If a user wants to paralellize at a higher level than the pairs, thwy would have to set * Adding a note that this is for the amg solver, but a similar change would need to be made for cholmod. |
I think what @ViralBShah might have been getting at is that if |
Ok, sorry for the confusion. Deleted a comment because I got myself confused. I think I get it now, no need to change the default value for |
This addresses the discussion in Circuitscape#236.
This addresses the discussion in #236.
@VLucet would you mind putting a final comment on this thread with some example code for your parallel processing approach now that it's working? EDIT: I know you covered it above but was just thinking appending the pmap example at the bottom of this thread would be helpful for future users. |
Ideally we would have it go into the documentation - but that needs #242. Until then this will have to suffice. |
the following script launch with
Im running into issues trying to get rid of the @Everywhere and using
|
Make sure you run |
It is what I was doing :)
|
Calling without
|
Can you paste your whole session? |
@ViralBShah Im realising i'm on 1.3.1, but you just recently commited for 1.4 to be minimum requirement.
Do you mean my Manifest and Project files? |
I meant the screendump of everything from the point you start julia. You could post it as a gist. That way we can see all the commands and also try reproduce. I suspect the fix should be straightforward. |
Yes, that is mainly because some of the dependent packages need Julia 1.4. |
Alright, here is a screen dump, with fresh install of julia 1.4.2 and dev circuitscape. |
The |
@ViralBShah thank you for your continued help on this. I keep running into errors, as it looks like whenever I do
For example: |
Doesn't this just work for you? I'm doing this on Julia 1.4.2.
|
@ViralBShah I am at a loss to understand what is going on, despite my reading of the doc of the Maybe there is something very basic that I do not understand, and to the risk of looking stupid, here is what I did: |
And, as per suggested in the issue, I fixed my problem with |
@KristofferC - Is this diagnosis right about the error described above due to Pkg environments issue in JuliaLang/julia#28781? @VLucet Maybe you just have to throw |
@ranjanan I will give it a try! If I understand I have to add EDIT: I see there is no need for the |
I see you are trying to remove The way this will work is that you start with multiple workers,
This code should probably be in a separate main or runner file, and not be part of the module. That makes things easier. |
This seems to work for meta-parallelisation: addprocs(3) @Everywhere searchdir(path,key) = filter(x->occursin(key,x), readdir(path)) pmap(compute, ini_list, batch_size=3) |
@frederikvand I do also seem to observe that although all the workers start, a lot of them seem to quickly die, or seem to alternate between in use and idle (looking at your edited message suggest you had some trouble with that too). Is |
Yeah I think its related to memory usage peaks. Its hard to notice with memory monitoring because the failing workers are caused by the peaks I think. When I alter batch size and use bigmemory nodes (264 gig ram) I it is solved. |
I was wondering what would be the best way to paralellize Circuitscape, when the goal is not to solve multiple pairs per map (this is natively paralellized if I'm not mistaken), but when the goal is to solve many maps (one or two pairs per map). In my use case I have thousands of different INI files to map over.
The text was updated successfully, but these errors were encountered: