A repository to benchmark and compare the memory footprint of NOAA-FIMS/FIMS builds.
/R: Helper R scripts for setup and benchmark stage execution./scripts: Shell runners for memory profiling tools./outputs: Benchmark and profiler outputs (.gitkeepincluded)./.devcontainer: Codespaces setup for debug-safe R compilation flags.
This repository includes .devcontainer/postCreate.sh, which configures ~/.R/Makevars with:
PKG_CXXFLAGS += -g -O0 -fno-omit-frame-pointer -fvisibility=defaultPKG_STRIP = true
These settings preserve symbols and frame pointers for profiler-friendly builds.
R/setup_FIMS provides:
install_fims_debug(ref = "main")It installs NOAA-FIMS/FIMS from GitHub for a chosen branch/tag/commit using source compilation.
R/run_benchmark.R is structured into five stages:
- Static model construction through
MakeADFun() - Single evaluation calls (
obj$fn()andobj$gr()) - Full optimization run with
nlminb(withoutsdreport) - Full optimization run with
nlminbandsdreport - Cleanup and retention check via
TMB::FreeADFun(obj)andgc()
Before sourcing
R/run_benchmark.R, definefims_stage1_builder()so it returns the stage-1MakeADFun()object.
bash scripts/run_massif.shThis generates:
outputs/massif_main.outoutputs/massif_xptr.out
Use ms_print to inspect each output file.