Skip to content

Commit

Permalink
use new mpiexec syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelbiron committed Nov 6, 2023
1 parent 931a027 commit 7e0cd99
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
8 changes: 3 additions & 5 deletions src/submission/ChildProcess.jl
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,9 @@ function pigeons(pt_arguments, new_process::ChildProcess)
# write("output.txt", merge(oc))
run(julia_cmd, wait = new_process.wait)
else
mpiexec() do exe
mpi_cmd = `$exe $(new_process.mpiexec_args) -n $(new_process.n_local_mpi_processes)`
cmd = `$mpi_cmd $julia_cmd`
run(cmd, wait = new_process.wait)
end
mpi_cmd = `$(mpiexec()) $(new_process.mpiexec_args) -n $(new_process.n_local_mpi_processes)`
cmd = `$mpi_cmd $julia_cmd`
run(cmd, wait = new_process.wait)
end
return Result{PT}(exec_folder)
end
Expand Down
6 changes: 2 additions & 4 deletions test/supporting/mpi_test_utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,8 @@ function mpi_test(n_processes::Int, test_file::String; options = [])
project_dir = dirname(project_file)
run(`$jl_cmd --project=$project_dir -e "using Pkg; Pkg.instantiate(); Pkg.precompile()"`)
resolved_test_file = abspath(test_file)
mpiexec() do exe
mpi_args = extra_mpi_args()
run(`$exe $mpi_args -n $n_processes $jl_cmd -t 2 --project=$project_dir $resolved_test_file $options`)
end
mpi_args = extra_mpi_args()
run(`$(mpiexec()) $mpi_args -n $n_processes $jl_cmd -t 2 --project=$project_dir $resolved_test_file $options`)
end

function set_n_mpis_to_one_on_windows(default_n_mpis::Int)
Expand Down

0 comments on commit 7e0cd99

Please sign in to comment.