Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

如何调试 example 中的代码 #105

Closed
xuxiangwork opened this issue Jul 21, 2020 · 1 comment
Closed

如何调试 example 中的代码 #105

xuxiangwork opened this issue Jul 21, 2020 · 1 comment

Comments

@xuxiangwork
Copy link

挺久没有接触 c++ 代码,想通过调试阅读 example 的代码,通过 vscode 配置了一下 launch.json ,preLaunchTask 没问题,但是调试失败,错误信息如下:

=thread-group-added,id="i1"
GNU gdb (Ubuntu 8.2-0ubuntu1) 8.2
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word".
Warning: Debuggee TargetArchitecture not detected, assuming x86_64.
=cmd-param-changed,param="pagination",value="off"
Stopped due to shared library event (no libraries added or removed)
Loaded '/lib64/ld-linux-x86-64.so.2'. Symbols loaded.
[Inferior 1 (process 9764) exited with code 0177]
The program '/home/work/app/plato/bazel-bin/example/pagerank' has exited with code 177 (0x000000b1).

配置的 launch.json 如下:

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "(gdb+bazel) Launch Debug",
            "preLaunchTask": "Bazel Build (Debug)",
            "type": "cppdbg",
            "request": "launch",
            "program": "${workspaceFolder}/bazel-bin/${relativeFileDirname}/${fileBasenameNoExtension}",
            // 用 pagerank 尝试一下
            "args": [
                "--input",
                "${workspaceFolder}/data/graph/v100_e2150_ua_c3.csv",
                "--output",
                "/tmp/pagerank"
            ],
            "stopAtEntry": true,
            "cwd": "${workspaceFolder}",
            // "cwd": "${workspaceFolder}/bazel-bin/${relativeFileDirname}/${fileBasenameNoExtension}.runfiles/__main__",
            "environment": [],
            "externalConsole": false,
            "MIMode": "gdb",
            "setupCommands": [
                {
                    "description": "Enable pretty-printing for gdb",
                    "text": "-enable-pretty-printing",
                    "ignoreFailures": false
                }
            ]
        },
    ]
}

还请不吝赐教

@ustcyu
Copy link
Contributor

ustcyu commented Jul 23, 2020

Plato是基于MPI的分布式计算框架,如果要本地执行,可参考:
https://github.com/Tencent/plato/blob/master/scripts/run_pagerank_local.sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants