madeleineudell / madeleineudell/ParallelSparseRegression.jl

Parallel execution may be slower than serial

Open
#3 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Julia
Stars
12
Forks
7
PR merge metrics
No merged PRs in 30d

Description

@madeleineudell Thanks for this package, here is the output of my initial testing:
## Sample program:

```
using ParallelSparseRegression

m,n,p = 2048,1024,.1
A = sprand(m,n,p)
x0 = Base.shmem_randn(n)
b = A*x0
rho = 1
lambda = 1
quiet = false
maxiters = 100

params = Params(rho,quiet,maxiters)

# Lasso
@time z_lasso = lasso(A,b,lambda; params=params)
```

Calling the following program with different addprocs values gives the following:
## Output without addprocs:

1000 : 1.76e+00 1.27e-01 5.54e-03 4.09e+01
elapsed time: 24.422318823 seconds (6440755392 bytes allocated)
## Output with addprocs(3):

1000 : 2.15e+00 1.12e-01 6.07e-03 4.65e+01
elapsed time: 90.979009048 seconds (12805856436 bytes allocated)
## Output with addprocs(7):

1000 : 1.75e+00 1.47e-01 5.74e-03 4.21e+01
elapsed time: 228.324713722 seconds (28927210844 bytes allocated)
## Full output with values for every iteration:

https://gist.github.com/ingenieroariel/9095001

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running the sample Julia program with no workers, addprocs(3), and addprocs(7), then compare its timings and allocations with the linked gist. Trace the parallel execution path used by lasso and determine why additional workers increase runtime; done means the cause is identified and the reported parallel behavior is addressed or documented with a verified benchmark.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
distributed-systems, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.