ソース情報
- リポジトリ
- SWMFsoftware/FLEKS
- ソースの最終更新活動
- 2026年2月22日 19:58
- 検出された SKILL.md の言語
- 英語
- スター
- 4
- フォーク
- 2
インストール方法
デフォルトでは、最初にソースを確認する Prompt が選択されています。直接コマンドに切り替えるか、ローカルコピーをダウンロードすることもできます。
ソースファイルを確認
インストールを決める前に、SKILL.md と SkillsMP に表示されている付属ファイルをお読みください。
メニュー
デフォルトでは、最初にソースを確認する Prompt が選択されています。直接コマンドに切り替えるか、ローカルコピーをダウンロードすることもできます。
インストールを決める前に、SKILL.md と SkillsMP に表示されている付属ファイルをお読みください。
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
直接コマンドでは確認用 Prompt が省略されます。実行前にソースを確認してください。
npx skills add https://github.com/SWMFsoftware/FLEKS --skill debug-sessionコマンドは1行のまま表示されます。コピー前に横へスクロールして全体を確認してください。
ローカルで確認しますか?SkillsMP が現在取得できるファイルをダウンロードできます。
Create new compiled .cpp/.h files or selectable FLEKS user source templates following project conventions
Compile FLEKS standalone or as an SWMF component, build the converter, and regenerate compile_commands.json
Build documentation from code comments and LaTeX sources
SOC 職業分類に基づく
SKILL.md を表示中
| name | Debug Session |
| description | Set up and launch a debugging session for FLEKS using VS Code or lldb |
This skill helps set up and run debugging sessions for FLEKS.
DEBUGC flag in
Makefile.conf already includes -g)-O0 for best debuggability (check
OPT0–OPT4 in Makefile.conf)lldb (macOS default)The debug flags are configured in Makefile.conf (referenced via SWMF).
The default DEBUGC is -g -Wall -Wextra -Wno-unused-parameter, which
includes debug symbols. To ensure no optimization interferes, verify
OPT3 = -O0 in Makefile.conf.
The existing launch configuration is in .vscode/launch.json:
"cpp build and debug active file"${workspaceFolder}/../../run/SWMF.exe${workspaceFolder}/../../run/lldb on macOS (via osx.MIMode), gdb on Linux
(via linux.MIMode)"cpp build active file" (defined in
.vscode/tasks.json if present)F5 or go to Run → Start Debugging"cpp build and debug active file"Debug: Toggle Breakpoint commandcd ../../run
lldb ./SWMF.exe
| Command | Description |
|---|---|
b <file>:<line> | Set breakpoint at file:line |
b <function> | Set breakpoint at function |
r | Run program |
c | Continue execution |
n | Step over (next) |
s | Step into |
finish | Step out of function |
p <var> | Print variable value |
po <expr> | Print object / evaluate expression |
bt | Show backtrace |
frame select <n> | Select stack frame |
thread list | List all threads |
quit | Exit debugger |
cd ../../run
lldb ./SWMF.exe
(lldb) b Pic.cpp:100
(lldb) r
(lldb) p variableName
(lldb) bt
(lldb) c
For debugging parallel runs, you have several options:
# Run MPI program
cd ../../run
mpirun -np 4 ./SWMF.exe &
# Find process ID
ps aux | grep SWMF
# Attach lldb
lldb -p <pid>
mpirun -np 4 xterm -e lldb ./SWMF.exe
For many debugging scenarios, running with a single MPI process is the simplest approach:
cd ../../run
lldb -- mpirun -np 1 ./SWMF.exe
For physics simulations, useful things to watch:
tc.iCycle — Current simulation cycletc.timeSI — Simulation time in SI unitsnGst — Number of ghost cellsnodeE(iv, 0) for E_x)| Issue | Solution |
|---|---|
| No symbols | Rebuild with -g flag (default in DEBUGC) |
| Can't find source | Check sourceFileMap in launch.json or use settings set target.source-map in lldb |
| Breakpoint not hit | Verify code path is executed; check MPI rank |
| Variables optimized away | Set OPT3 = -O0 in Makefile.conf and rebuild |
| Fortran crash / backtrace | Add -fbacktrace to DEBUGFLAG in Makefile.conf (default on) |