1

MPI.jl is a Julia wrapper for MPI.

Here is my launcher file in Vscode

{
    "version": "0.2.0",
    "configurations": [

        {
            "type": "julia",
            "request": "launch",
            "name": "Run active Julia file",
            "program": "${file}",
            "stopOnEntry": false,
            "cwd": "${workspaceFolder}",
            "juliaEnv": "${command:activeJuliaEnvironment}",
        }
    ]
}

The problem is that the program requires 2 MPI processes to run, but when I start with debugger then only one process is started and the program fails.

How to debug the program using mpiexecjl?

Khalid Bin Huda
  • 1,583
  • 17
  • 16
  • 1
    I believe you need to use `mpiexecjl` instead of `julia` to launch the process as in this example: https://juliaparallel.org/MPI.jl/stable/examples/01-hello/ – Przemyslaw Szufel Sep 22 '22 at 21:24
  • When I set the type to "mpiexecjl" instead of Julia. The Vscode complains that "The debug type is not recognized". – Khalid Bin Huda Sep 22 '22 at 21:33
  • 1
    I don't think you can debug in parallel in vscode, unless this issue has been resolved? https://github.com/Microsoft/vscode-cpptools/issues/1723 You can still use GDB with Julia and mpirun a la this answer to debug: https://stackoverflow.com/questions/329259/how-do-i-debug-an-mpi-program – kirklong Sep 23 '22 at 00:44

0 Answers0