Core Problems
- Uncompiled Source Files: Many PAR program
.c files exist in source tree (e.g., src/par/main/velocity_perturbation/velpert.c) but aren't compiled to $CWPROOT/bin/
- Broken
suhelp Detection: The help command fails to list PAR programs due to outdated source file lookup
Detailed Findings
1. Compilation Issues:
- Verified missing programs (e.g.,
velpert) have source files:
find src/par -name velpert.c
# → src/par/main/velocity_perturbation/velpert.c
- These programs don't appear in
$CWPROOT/bin/ after standard installation
- Manual compilation works:
cd src/par/main/velocity_perturbation
make # Successfully creates velpert in bin/
More details can be found in this document:
missed_commands.md
2. suhelp Problems:
- Current output shows error instead of program list:
PAR PROGRAMS: (programs with self-documentation)
ls: cannot access '*.c': No such file or directory
- Root cause: Script looks for
.c files only in flat directory ($PAR/main/*.c) while sources now live in subfolders
3. Connection Between Issues:
- The compilation system and help system share the same broken assumption about source file locations
- Both need updating to understand the new subdirectory structure
Expected Behavior
- Compilation: All PAR programs in
src/par/main/ and subdirectories should compile during installation
- Help System:
suhelp should display all available PAR programs
Suggested Fixes
For Compilation:
# Proposed change to Makefile:
# Recursively compile all .c files in par/main/
PAR_PROGS := $(shell find par/main -name '*.c' | sed 's/\.c//')
For suhelp:
# Change to recursively find programs
find $PAR/main -name "*.c" | sed 's|.*/||;s/\.c$//'
Impact Analysis
This affects:
- All users installing from source
- Anyone relying on
suhelp for program discovery
- Particularly impacts programs like
velpert in subdirectories
Supporting Evidence
Test case with velpert:
- Source exists: ✅
src/par/main/velocity_perturbation/velpert.c
- Not compiled by default: ❌ Missing in
$CWPROOT/bin/
- Manually compilable: ✅
make in source directory works
suhelp broken: ❌ Can't detect even after manual compilation
Core Problems
.cfiles exist in source tree (e.g.,src/par/main/velocity_perturbation/velpert.c) but aren't compiled to$CWPROOT/bin/suhelpDetection: The help command fails to list PAR programs due to outdated source file lookupDetailed Findings
1. Compilation Issues:
velpert) have source files:find src/par -name velpert.c # → src/par/main/velocity_perturbation/velpert.c$CWPROOT/bin/after standard installationMore details can be found in this document:
missed_commands.md
2.
suhelpProblems:.cfiles only in flat directory ($PAR/main/*.c) while sources now live in subfolders3. Connection Between Issues:
Expected Behavior
src/par/main/and subdirectories should compile during installationsuhelpshould display all available PAR programsSuggested Fixes
For Compilation:
For
suhelp:Impact Analysis
This affects:
suhelpfor program discoveryvelpertin subdirectoriesSupporting Evidence
Test case with
velpert:src/par/main/velocity_perturbation/velpert.c$CWPROOT/bin/makein source directory workssuhelpbroken: ❌ Can't detect even after manual compilation