Mercurial > repos > public > sbplib_julia
changeset 150:4dc19757cada parallel_test
Minor cleanup.
author | Vidar Stiernström <vidar.stiernstrom@it.uu.se> |
---|---|
date | Tue, 26 Feb 2019 11:27:04 +0100 |
parents | 11b6646918d4 |
children | 80f7d7abe47d |
files | distributedTest.jl |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
diff -r 11b6646918d4 -r 4dc19757cada distributedTest.jl --- a/distributedTest.jl Tue Feb 26 11:09:30 2019 +0100 +++ b/distributedTest.jl Tue Feb 26 11:27:04 2019 +0100 @@ -12,8 +12,7 @@ id = Tuple(ci[myid()-1]) # Compute the size of each partitioned grid - size_partition = size./nworkers_per_dim - size_partition = map(x->Int(x),size_partition) # TODO: Cant this be done in an easier way?... + size_partition = Int.(size./nworkers_per_dim) # Compute domain size for each partition domain_size = limit_upper.-limit_lower domain_partition_size = domain_size./nworkers_per_dim @@ -38,7 +37,8 @@ #Should these be declared globally or locally? limit_lower = (0., 0.) limit_upper = (2pi, 3pi/2) - nworkers_per_dim = (Int(nworkers()/2),Int(nworkers()/2)) + # TODO: Fix initiation of nworkers_per_dim + nworkers_per_dim = Int.(ntuple(x->nworkers()/2,2)) init(x,y) = sin(x) + sin(y) grid = create_partitioned_grid(gridsize, limit_lower , limit_upper, nworkers_per_dim) @inbounds v[:L] = sbp.Grid.evalOn(grid, init)