Skip to content

Commit

Permalink
fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
guilhermebodin committed Mar 28, 2024
1 parent 64952ef commit c763474
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
5 changes: 3 additions & 2 deletions src/controller.jl
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ is_job_queue_empty(controller::Controller) = isempty(controller.job_queue)
any_pending_jobs(controller::Controller) = !isempty(controller.pending_jobs)

function any_jobs_left(controller::Controller)
!is_job_queue_empty(controller) || any_pending_jobs(controller)
return !is_job_queue_empty(controller) || any_pending_jobs(controller)
end

function _pick_job_to_send!(controller::Controller)
Expand Down Expand Up @@ -97,7 +97,8 @@ function send_termination_message(controller::Controller)
end
requests = Vector{JobRequest}()
for worker in 1:controller.n_workers
request = MPI.isend(Job(controller.last_job_id, TerminationMessage()), _mpi_comm(); dest = worker, tag = worker + 32)
request =
MPI.isend(Job(controller.last_job_id, TerminationMessage()), _mpi_comm(); dest = worker, tag = worker + 32)
controller.worker_status[worker] = WORKER_AVAILABLE
push!(requests, JobRequest(worker, request))
end
Expand Down
2 changes: 1 addition & 1 deletion src/job.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Base.@kwdef mutable struct Job{T} <: AbstractJob
message::T
end

mutable struct JobAnswer{T} <: AbstractJob
mutable struct JobAnswer{T} <: AbstractJob
job_id::Int
message::T
end
Expand Down
2 changes: 1 addition & 1 deletion src/pmap.jl
Original file line number Diff line number Diff line change
Expand Up @@ -71,5 +71,5 @@ function pmap(f::Function, jobs::Vector, data_defined_in_process = nothing)
end
return result
end
error("Should never get here")
return error("Should never get here")

Check warning on line 74 in src/pmap.jl

View check run for this annotation

Codecov / codecov/patch

src/pmap.jl#L74

Added line #L74 was not covered by tests
end
2 changes: 1 addition & 1 deletion src/worker.jl
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ mutable struct Worker
end

function has_job(worker::Worker)
MPI.Iprobe(_mpi_comm(); source = controller_rank(), tag = worker.rank + 32)
return MPI.Iprobe(_mpi_comm(); source = controller_rank(), tag = worker.rank + 32)

Check warning on line 18 in src/worker.jl

View check run for this annotation

Codecov / codecov/patch

src/worker.jl#L17-L18

Added lines #L17 - L18 were not covered by tests
end

"""
Expand Down

0 comments on commit c763474

Please sign in to comment.