Last active
November 10, 2017 13:25
-
-
Save baggepinnen/2bc01c331392c32a4393930d7737290f to your computer and use it in GitHub Desktop.
A nice way to run many experiments in parallel
This file contains 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 characters
@sync begin # Enusres that both operations below are finished before leaving this scope | |
@async begin # Enusres that the last running job does not stop the next parallel operation from starting | |
info("Launching forward only") | |
result1 = pmap(35:-2:5) do it # Start heaviest job (35) first | |
do_something(it) # Execution time proportional to it | |
end | |
end | |
@async begin | |
info("Launching forward inverse") | |
result2 = pmap(35:-2:5) do it | |
do_something_else(it) | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment