Created
February 8, 2017 21:16
-
-
Save multidis/ca16bed5fcdd29f88ca1e07973c9cd16 to your computer and use it in GitHub Desktop.
Revisions
-
multidis created this gist
Feb 8, 2017 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,33 @@ using Optim ## try commenting out the log in this line, Optim src/problems/univariate.jl: ## p18(x) = x <= 3.0 ? (x-2.0)^2 : 2.0###*log(x-2.0)+1.0 function frunmap(nmap::Int64, nmat::Int64) M = randn(nmat, nmat) # closure to parallel-apply function fmaploc(vi) # not doing anything here return 1.0 end return pmap(fmaploc, collect(1:nmap)) end Ntimes = 10 Nmatsize = 1_000 @time println(frunmap(Ntimes, Nmatsize)) @time frunmap(Ntimes, Nmatsize) # repeat more times than CPU cores @time frunmap(Ntimes, Nmatsize) @time frunmap(Ntimes, Nmatsize) @time frunmap(Ntimes, Nmatsize) @time frunmap(Ntimes, Nmatsize) @time frunmap(Ntimes, Nmatsize) @time frunmap(Ntimes, Nmatsize) @time frunmap(Ntimes, Nmatsize) @time frunmap(Ntimes, Nmatsize) @time frunmap(Ntimes, Nmatsize) @time frunmap(Ntimes, Nmatsize)