Giter VIP home page Giter VIP logo

Comments (4)

yyoncho avatar yyoncho commented on June 2, 2024

OMPI_CXX=g++

This part can go as an env param, right?

mpiexec -np 1

What is this part supposed to do?

from dap-mode.

durwasa-chakraborty avatar durwasa-chakraborty commented on June 2, 2024

OMPI_CXX=g++

This part can go as an env param, right?

I did not think of that! Thank you. I'll dig around to see how to add env parameter in the launch.json.

mpiexec -np 1

What is this part supposed to do?

The mpiexec command is used to execute the binary. Since the binary has been compiled with mpi++, using mpiexec is the required method to run it. The -np flag specifies the number of processes to initiate, which is set to 1 in this case. Debugging multiple processes can be tough -np 2 but theoretically np 1 should be same as debugging any C++ code.

from dap-mode.

yyoncho avatar yyoncho commented on June 2, 2024

To me it sounds like one way to debug it is to attach to the process, right? That would be the way to debug it even if you start the process via command like lldb?

from dap-mode.

durwasa-chakraborty avatar durwasa-chakraborty commented on June 2, 2024

TL;DR

Could you assist me / point me to some examples which might help me in resolving the issue with the attach request in the LLDB setting?


Long answer
I tried to attach the process and debug the code. However, I'm encountering issues when using the attach request. Below are the steps I've taken and the outcomes:

  1. Initial Setup:

    • Compiled the C++ code with g++ -g betweeness_centrality_serial.cpp -o betweeness_centrality_serial.
    • Launched LLDB with lldb betweeness_centrality_serial.
  2. LLDB Attach Attempt:

    • Used the following launch.json configuration with an attach request:
      {
          "configurations": [{
              "type": "lldb-vscode",
              "request": "attach",
              "name": "Debug | C++ | Betweenness Centrality Serial",
              "cwd": "${workspaceFolder}",
              "program": "${workspaceFolder}/betweeness_centrality_serial",
              "pid": "${command:PickProcess}"
          }]
      }
    • Selected the process from the list corresponding to the lldb <binary>
    • Result: The debug session exited with process status: 9.
  3. Changing Request to launch:

    • Modified the request to launch in launch.json.
    • Outcome: Debugger functioned correctly, allowing PID selection and showing expected behavior.
  4. Parallel Execution Issue:

    • Executed OMPI_CXX=g++ mpiexec -np 1 lldb ./bc_dslV2 small.graph.
    • Tried attaching the process with the same attach configuration for a parallel setup.
    • Result: Encountered the same error - "debug session exited with process status".

I suspect the issue lies with the attach request configuration itself. I've referred to LLDB-VSCode documentation and tried all the three techniques mentioned in the doc (pid, waitFor, application name) but couldn't pin point it whether it's a syntax issue or a problem with the process.

from dap-mode.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.