소스 정보
- 저장소
- 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명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? 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) |