Validation-Centric AI-Assisted GPU Porting of a 250,000+ Line Legacy Weather Simulation Code
Abstract: Recent advances in LLMs have made CLI-based AI agents a practical tool for accelerating GPU porting of large legacy scientific applications. Such applications, however, are not merely old code bases; they are scientific assets whose credibility has been accumulated through long-term development, comparison with observations, and use in domain studies. GPU porting must therefore preserve this scientific validity while adapting the implementation to GPU-centric HPC systems. This paper presents a validation-centric AI-assisted GPU porting workflow through a case study of CReSS, a legacy Fortran weather simulation code with more than 250,000 lines. The workflow uses an AI agent to extract OpenMP regions, generate dump-based kernel benchmarks from physically meaningful simulation states, apply OpenACC transformations, and validate results through element-wise comparison with dumped reference data and application-level validation. Using a real typhoon simulation, the workflow produced numerically validated GPU implementations for 162 target kernels and achieved a 5.1x application-level speedup within practical wall-clock development cost. In particular, it detected numerical discrepancies in five kernels caused by floating-point and intrinsic-function differences, including threshold-sensitive branch divergence and cancellation effects, enabling feedback to the application developers. The case study suggests that, for large legacy scientific applications requiring dump-based validation, practical AI-assisted GPU porting must manage session-spanning context, runtime-state reconstruction, and costly recovery from small static-analysis omissions. These findings demonstrate that AI-assisted GPU porting requires not only code generation, but validation-centric workflow design.
Paper Prompts
Sign up for free to create and run prompts on this paper.
Top Community Prompts
Explain it Like I'm 14
1. What is the paper about?
This paper explains how artificial intelligence can help move a very large weather program from CPUs to GPUs.
The program is called CReSS, which stands for Cloud Resolving Storm Simulator. It is written in the older programming language Fortran and contains more than 250,000 lines of code. CReSS is used to simulate typhoons, heavy rain, clouds, and other severe weather.
GPUs can perform many calculations at the same time, so they can make scientific programs much faster. However, changing a weather model to use GPUs is risky: even a tiny calculation difference might eventually change the simulated weather. The paper therefore focuses on a careful process called validation-centric GPU porting.
In simple terms, the researchers asked:
Can an AI assistant help convert a huge weather program to run on GPUs while checking that it still produces scientifically trustworthy results?
2. Main objectives and research questions
The researchers had several closely related goals:
- Speed up CReSS by moving important calculations from the CPU to the GPU.
- Use an AI agent to help with repetitive programming tasks, such as finding suitable code sections and rewriting them for GPUs.
- Check each changed part carefully instead of trusting that code is correct just because it compiles.
- Find out whether differences between CPU and GPU answers are:
- actual programming mistakes, or
- small rounding differences caused by the way computers calculate numbers.
- Test whether the complete GPU version still produces a realistic typhoon simulation.
- Understand what makes AI-assisted GPU porting difficult in a very large, old scientific program.
The paper is not mainly trying to prove that the AI can work completely on its own. Instead, it studies how AI can be used as part of a workflow where computers do repetitive work and human experts judge scientific correctness.
3. How did the researchers do the study?
The weather program and test simulation
CReSS has:
- 599 Fortran source files,
- about 260,000 lines of code,
- 387 sections that use OpenMP to perform calculations in parallel.
OpenMP is a way of telling a CPU that several parts of a calculation can be done at the same time. The researchers looked at these sections as possible candidates for GPU conversion.
They used a realistic typhoon case from the western Pacific in September 2022. The simulation covered a very large three-dimensional grid of approximately 100 million points and included processes such as:
- cloud formation,
- radiation,
- turbulence,
- surface effects, and
- cloud microphysics.
Of the 387 parallel sections, 162 were actually used in this particular simulation, so these 162 sections became the main GPU targets.
The six-stage workflow
The researchers organized the work into six main stages:
- Reviewing the code The AI examined the parallel sections and marked possible problems, such as synchronization commands, function calls, or changes to shared data.
- Profiling the program Profiling means measuring which parts of a program run, how often they run, and how much time they use. This helped the researchers identify the important sections for the selected typhoon simulation.
- Creating CPU test programs The researchers extracted each target section and made a small, separate test program for it. This made it easier to study one calculation at a time.
- Saving real simulation data Instead of testing with random numbers, they ran the original CPU weather model and saved the data entering and leaving each target section. These saved files are called dumps.
This is similar to taking a snapshot of a complicated machine while it is working. The researchers could then give the same snapshot to the separate CPU and GPU test programs and compare their answers.
- Converting the calculations to GPU code The AI transformed the CPU test programs using OpenACC. OpenACC uses special instructions, called directives, that tell a compiler which calculations should run on a GPU.
The researchers also used Unified Memory, which allows the CPU and GPU to share data more easily. This made the first conversion simpler, although it may not be the fastest possible method.
- Combining and testing the GPU code After testing individual sections, the researchers put the GPU versions back into the full weather model. They then ran the complete typhoon simulation and compared important weather measurements with trusted reference values.
How did they compare the results?
For each kernel—a small, important calculation—the GPU result was compared with the CPU result element by element. For example, if a calculation produced a large three-dimensional array, every corresponding value in the CPU and GPU arrays was checked.
The researchers allowed a very small difference because computers often round decimal numbers slightly differently. The tolerance was set to for the kernel tests.
For the complete application, they compared the maximum and minimum pressure perturbations. The GPU simulation was accepted if its relative differences from the reference values were less than .
4. Main findings
The GPU version was successfully validated
The workflow produced GPU versions for all 162 target kernels used in the test scenario.
After the kernels were combined into the full application, the GPU version completed the 360-step, 30-minute typhoon simulation and passed the application-level validation tests.
This is important because testing only small pieces does not guarantee that the entire weather model will behave correctly over time. The full simulation test showed that the converted program still produced acceptable overall results.
The GPU version was much faster
The GPU implementation achieved an application-level speedup of approximately:
This means the GPU version completed the tested simulation in about one-fifth of the time needed by the 72-thread CPU version.
That improvement matters because high-resolution weather simulations require enormous amounts of computation. Faster simulations could help researchers:
- run more experiments,
- study more possible weather conditions,
- produce forecasts more quickly, and
- use larger or more detailed simulation areas.
The testing found five numerical discrepancies
Five kernels produced differences that were larger than the strict kernel-level tolerance. These differences were investigated rather than automatically labeled as bugs.
The causes included:
- Rounding differences: CPUs and GPUs may round decimal calculations slightly differently.
- Different mathematical functions: functions such as
exp(),log(), andsqrt()may produce slightly different results on different hardware. - Threshold-sensitive decisions: a tiny change can cause a value to cross a boundary and make the program choose a different branch.
- Cancellation: when two nearly equal numbers are subtracted, small errors can become more noticeable.
- Values close to zero: relative error can look very large when the correct answer is zero or almost zero.
For example, one calculation compared a temperature with a threshold. The CPU calculated a value just above the threshold, while the GPU calculated a value just below it. Although the difference was extremely tiny, the two versions took different paths in the program.
The researchers concluded that these five cases were acceptable numerical differences, not programming mistakes, for this simulation. They reported them to the CReSS developers so that the experts could make that judgment.
The workflow itself had important difficulties
The study found that AI-assisted GPU porting is not simply a matter of asking an AI to “rewrite the code.”
The AI also needed to understand:
- which variables were available at each point in the simulation,
- how arrays were created and stored,
- when certain data were valid,
- how binary dump files should be read,
- which physical options were turned on, and
- what had happened earlier in the simulation.
If even one important variable was missed, the researchers sometimes had to rerun a long simulation to collect the correct data. This made small analysis mistakes expensive.
The AI also needed information that lasted across multiple work sessions. If instructions and discoveries were kept only in the conversation history, they could be lost when a session ended. The researchers therefore stored important rules and settings in written specifications.
5. Why are these results important?
The paper shows that AI can help modernize a very large scientific program, but only when it is used together with strong testing and human supervision.
The most important lesson is:
Fast code is not enough. A scientific program must also remain trustworthy.
A weather model is different from an ordinary application. If a video game has a tiny numerical difference, nobody may notice. But in a weather simulation, a small difference can grow over many time steps and change the predicted location of a storm or amount of rainfall.
Testing individual kernels helped the researchers locate problems early. Testing the whole application then showed whether small differences affected the final weather simulation.
This approach could be useful for other old scientific programs, including models for:
- climate,
- oceans,
- earthquakes,
- space weather,
- fluid dynamics, and
- engineering simulations.
6. Simple conclusion and potential impact
The paper presents a practical way to use AI when moving a large, old weather program to GPUs. The AI helped inspect code, create test programs, convert calculations, and fix technical problems. However, human experts remained necessary to decide whether numerical differences were harmless or scientifically important.
The result was a GPU version of CReSS that:
- successfully converted 162 important calculation sections,
- passed the complete application-level tests,
- ran about 5.1 times faster than the tested CPU version, and
- revealed five small numerical differences that could be investigated and explained.
The broader message is that AI can reduce the time needed to update scientific software, but it should not replace careful scientific checking. For reliable AI-assisted programming, the process must include realistic test data, detailed comparisons, written instructions, and expert review.
Knowledge Gaps
Knowledge gaps, limitations, and open questions
The paper demonstrates feasibility in one CReSS porting scenario, but leaves the following issues unresolved:
- Generalisability beyond CReSS is not established. The workflow is evaluated on one legacy Fortran weather model, so its effectiveness for other scientific domains, programming languages, code structures, or applications with less regular loop nests remains unknown.
- Coverage is limited to 162 of 387 OpenMP regions. The 225 regions not executed in the selected typhoon scenario are not evaluated, leaving their GPU-portability, validation requirements, and potential performance contribution unresolved.
- The validation scenario is temporally short. Validation covers only 30 minutes and 360 timesteps, so the workflow does not establish whether small CPU/GPU differences remain acceptable over production-length forecasts or long climate integrations.
- Only one physical case and configuration are tested. The results may not transfer to other typhoon events, initial and boundary conditions, resolutions, domain sizes, physics options, or meteorological regimes.
- Application-level validity is assessed using only two scalar metrics. Maximum and minimum pressure perturbations may not detect errors in spatial structure, precipitation, wind fields, thermodynamic variables, timing, conservation properties, or other scientifically important outputs.
- The acceptance threshold of is not scientifically justified in the paper. It is unclear how the threshold relates to forecast skill, observational uncertainty, established CReSS validation practice, or downstream research conclusions.
- The treatment of numerical discrepancies remains partly subjective. Five discrepancies were classified as acceptable after human inspection, but no general decision procedure is provided for determining when threshold-sensitive branches, cancellation, or near-zero errors constitute scientifically meaningful defects.
- The error metric may be unstable near zero. Using a relative-error denominator bounded by can produce large reported errors for insignificant absolute differences, as illustrated by the
cloudcov.f90case; a more systematic combination of absolute, relative, ULP-based, and field-level criteria is not evaluated. - Only single-precision execution is studied. The behavior of the workflow under double precision, mixed precision, reduced precision, or precision-sensitive physical parameterizations remains unexplored.
- Snapshot-based kernel validation may miss state-dependent failures. Each kernel is tested using the last invocation in one 360-step simulation, leaving earlier states, alternative branches, repeated invocations, and rare physical conditions insufficiently covered.
- The adequacy of using only the last kernel invocation is not demonstrated. It is unknown whether this choice provides representative or worst-case coverage for all target kernels.
- The relationship between kernel-level tolerance and application-level propagation is unresolved. The paper does not quantify how individual kernel discrepancies accumulate, cancel, or amplify across timesteps and coupled physical processes.
- Runtime-state reconstruction is not evaluated as an automated capability. The paper identifies incomplete
variable_listentries and data-validity conditions as failure sources, but does not report reconstruction precision, automation success rates, or the fraction of cases requiring human correction. - The workflow’s human effort is not fully characterized. Human developers define specifications, interpret discrepancies, and diagnose failures, but the paper does not quantify their time, expertise requirements, number of interventions, or effect on total porting cost.
- AI-agent autonomy is explicitly not evaluated. Consequently, it remains unclear which workflow components can be reliably automated, how often the agent generates incorrect transformations, and how performance changes across different agents or prompting strategies.
- Results are tied to a narrow agent and software configuration. The study uses a particular Claude Code/Opus setup, NVIDIA HPC SDK 25.9, OpenACC, and
nvfortran; robustness across LLMs, agent versions, compilers, directive models, and compiler flags is unknown. - The impact of context-window and session management is not quantitatively isolated. The paper identifies session-spanning context as important, but does not compare persistent specifications with ordinary session workflows or measure the resulting reduction in repeated failures.
- Failure-recovery costs are not systematically measured. The paper notes that static-analysis omissions can trigger costly simulation reruns, but does not provide failure frequencies, recovery-time distributions, or a cost model for deciding when to rerun or revise artifacts.
- The reported development cost is insufficiently reproducible from the provided evidence. “Practical wall-clock development cost” is claimed, but detailed agent time, human time, computational time, number of simulations, token usage, and monetary cost are not fully reported.
- Performance evaluation is hardware-specific. The reported speedup on one Grace-Hopper node does not establish performance on other GPUs, CPUs, memory hierarchies, or multi-node systems.
- Multi-node and distributed-scaling behavior is not evaluated. MPI execution, GPU-aware communication, inter-node data movement, and scaling across multiple nodes are explicitly outside the study’s scope.
- Unified Memory limits the conclusions about optimized GPU performance. Because the implementation uses
-gpu=managed, the reported speedup does not show whether explicit data regions, migration control, asynchronous execution, kernel fusion, or communication overlap would yield substantially better performance. - The comparison baseline may not represent the best CPU or GPU implementation. The study compares against a 72-thread Grace CPU baseline and an initially ported Unified Memory implementation, without benchmarking alternative CPU settings, explicit OpenACC data management, or hand-optimized GPU code.
- Performance variability and repeatability are not reported. The paper does not provide repeated-run statistics, variance, warm-up effects, or sensitivity to Unified Memory placement and system load.
- The claim that OpenMP regions are suitable GPU targets is not broadly validated. The selected scenario contained no meta-review obstacle, but the workflow’s behavior on regions involving atomics, critical sections, global state, complex calls, dependencies, or irregular memory access remains unclear.
- Scientific validity is not compared against observations after porting. Agreement with the original CPU implementation is demonstrated for the selected metrics, but the GPU output is not independently assessed against observational data to determine whether both implementations retain physical realism.
- No formal conservation or physical-invariant analysis is provided. Important properties such as mass, energy, water, momentum, or tracer conservation are not tested as additional safeguards against numerically plausible but physically incorrect transformations.
- The reproducibility of dumped benchmarks is not fully addressed. The effects of MPI/OpenMP nondeterminism, binary I/O conventions, compiler/runtime versions, machine architecture, and simulation restart behavior on dumped input and reference data remain unspecified.
- The long-term maintenance implications are unresolved. It is not shown how the workflow handles future changes to CReSS source code, physics options, compiler versions, or validation specifications without regenerating and revalidating the entire benchmark suite.
Practical Applications
Immediate Applications
The paper’s demonstrated workflow is already applicable where organizations have large, validated Fortran/C/C++ scientific codes, access to GPU-based HPC systems, and domain experts who can interpret numerical discrepancies.
- GPU modernization of legacy weather and climate models — weather, climate, and HPC
- Apply the six-stage workflow—code meta-review, profiling, runtime-state dumping, CPU benchmark generation, OpenACC transformation, and integrated validation—to port mature atmospheric models to GPUs.
- Use
OpenMPregions as initial porting targets and generateOpenACCimplementations, while retaining CPU/GPU switching through conditional compilation. - A practical product could be an internal GPU-porting pipeline that produces:
- annotated source code,
- target-kernel inventories,
- standalone CPU/GPU benchmarks,
- reference dumps,
- numerical discrepancy reports, and
- integrated GPU builds.
- Evidence from the paper: 162 CReSS kernels were validated and the integrated application achieved a 5.1× speedup on one Grace-Hopper node.
- Dependencies: NVIDIA GPU/HPC access, compiler support such as NVIDIA HPC SDK, suitable OpenACC behavior, realistic validation scenarios, and continued involvement of weather-model developers.
- Validation infrastructure for AI-generated scientific code transformations — software engineering and scientific computing
- Use dump-based, element-wise kernel comparison as a quality gate for AI-generated parallelization, directive insertion, or refactoring.
- Treat compilation and successful execution as insufficient; require each generated kernel to reproduce CPU reference outputs within a declared tolerance before integration.
- A reusable workflow could automatically record:
- source-code revisions,
- extracted variables,
- array shapes and data types,
- input/reference-output dumps,
- compiler options,
- validation tolerances, and
- unresolved numerical differences.
- Dependencies: reliable reference implementations, reproducible builds, well-defined output metrics, and explicit handling of floating-point non-equivalence.
- Kernel-level regression testing for scientific HPC software — academia and research software
- Convert physically meaningful runtime states into persistent standalone regression tests rather than relying only on synthetic or random inputs.
- Re-run these tests after compiler upgrades, GPU changes, OpenACC revisions, or optimization changes.
- The approach is especially useful for kernels involving:
- cloud microphysics,
- radiation,
- turbulence,
- surface processes,
- numerical stencils, and
- reductions or threshold-based physical corrections.
- Dependencies: sufficient storage for dump data, compatible binary-I/O conventions, stable test scenarios, and policies for updating references when scientifically justified.
- Numerical discrepancy diagnosis and developer feedback — scientific software maintenance
- Use localized comparisons to distinguish implementation defects from acceptable CPU/GPU numerical variation.
- Automatically flag cases involving:
- threshold-sensitive branches,
- cancellation,
- intrinsic functions such as
exp,log, andsqrt, - near-zero values, and
- changed reduction order.
- This can support a developer dashboard that identifies the responsible kernel, element location, branch condition, and magnitude of the discrepancy.
- Dependencies: human domain expertise remains necessary. The paper shows that a discrepancy cannot be classified solely by a generic tolerance; its physical and algorithmic significance must be assessed.
- Safer incremental integration of GPU kernels — software engineering and HPC operations
- Integrate ported kernels individually or in groups using conditional compilation, enabling bisection when application-level results diverge.
- Maintain the original CPU implementation as a fallback for production debugging, scientific comparison, and hardware portability.
- This workflow can reduce the risk of replacing an entire trusted model with an opaque AI-generated implementation.
- Dependencies: build-system support for CPU/GPU variants and application-level acceptance metrics such as the pressure perturbation thresholds used in CReSS.
- Performance validation and bottleneck identification — supercomputing centers and research laboratories
- Combine numerical validation with tools such as NVIDIA Nsight to check:
- kernel execution time,
- memory-bandwidth utilization,
- Unified Memory page migration, and
- ineffective GPU parallelization.
- Use the results to revise only the anomalous kernel, then rerun its standalone validation before reintegration.
- Dependencies: profiling expertise and access to representative workloads. The demonstrated speedup is hardware- and scenario-specific and should not be assumed for other models or GPUs.
- AI-assisted modernization of other legacy simulation codes — engineering, energy, and environmental science
- Adapt the workflow to validated codes for ocean modeling, wildfire prediction, flood simulation, computational fluid dynamics, seismic modeling, or energy-system simulation.
- The key transferable idea is not OpenACC alone, but the combination of AI-assisted transformation with runtime-state reconstruction and staged validation.
- Dependencies: the target application must have identifiable computational regions, executable reference behavior, and domain-relevant validation metrics. Codes with highly irregular data structures or undocumented runtime state may require substantial manual preparation.
- Training and curriculum for scientific software engineering — academia and workforce development
- Use the workflow as a teaching framework for students and engineers learning:
- legacy-code analysis,
- GPU programming,
- numerical reproducibility,
- scientific verification and validation, and
- responsible use of coding agents.
- Students can compare synthetic unit tests with physically evolved dump-based tests and study why the latter expose failures missed by simple benchmarks.
- Dependencies: access to manageable scientific codes, GPU resources, and instructors capable of explaining numerical error and physical-model assumptions.
Long-Term Applications
The following applications require broader empirical evaluation, improved automation, larger-scale deployment, or changes beyond the scope of the case study.
- Automated, domain-aware GPU-porting platforms — HPC software products
- Develop a general-purpose agent platform that automatically:
- 1. identifies parallel regions,
- 2. reconstructs variable dependencies and allocation conditions,
- 3. inserts dump instrumentation,
- 4. generates CPU and GPU benchmarks,
- 5. performs staged validation,
- 6. diagnoses failures, and
- 7. prepares an integrated GPU branch.
- Such a platform could maintain external, session-independent specifications for compiler flags, I/O formats, tolerances, and known exceptional cases.
- Dependencies: more reliable static and dynamic analysis, persistent agent memory, robust recovery across sessions, and standardized metadata for scientific applications.
- Multi-GPU and distributed GPU weather forecasting — operational meteorology and disaster management
- Extend the single-node CReSS implementation to multi-GPU and multi-node forecasting workflows for typhoons, heavy rainfall, and convective systems.
- Potential outputs include faster ensemble forecasts, higher-resolution regional predictions, and more frequent emergency updates.
- Dependencies: MPI/GPU interoperability, communication-overlap strategies, explicit data management, load balancing, fault tolerance, and validation across longer simulations and more weather cases. The paper explicitly leaves multi-node execution outside its scope.
- Real-time or near-real-time severe-weather prediction — public safety and policy
- Use GPU acceleration to reduce forecast latency for typhoon tracking, rainfall warnings, landslide-risk estimation, and emergency response planning.
- Faster execution could support larger ensembles that quantify forecast uncertainty rather than producing only a single deterministic run.
- Dependencies: operational data-assimilation pipelines, reliable boundary conditions, long-duration application-level validation, calibrated uncertainty estimates, and regulatory or agency approval for decision support.
- AI-assisted modernization of climate and Earth-system model portfolios — climate research and policy
- Apply validation-centric porting to ensembles of legacy atmospheric, oceanic, land-surface, and coupled climate models.
- This could reduce the cost of running long climate projections and sensitivity studies on GPU-centric supercomputers.
- Dependencies: validation must cover climate statistics and long-term trends, not merely short simulation snapshots. Porting must also preserve ensemble behavior, conservation properties, parameterizations, and scientifically accepted reproducibility standards.
- Automated numerical-equivalence and tolerance management — compilers and scientific QA
- Build tools that learn or infer suitable error criteria for different variables and kernels instead of applying one global tolerance.
- For example, a future system could distinguish:
- absolute error near zero,
- relative error for large-scale quantities,
- ulp-based differences for floating-point diagnostics,
- branch-sensitive discrepancies, and
- physically meaningful application-level metrics.
- Dependencies: extensive cross-platform datasets, mathematical analysis of error propagation, and human approval. A tolerance that is acceptable for one weather variable may be unsafe for another.
- Physics-aware detection of dangerous branch divergence — weather, robotics, engineering, and simulation
- Extend the paper’s discrepancy analysis into tools that identify when a small numerical change switches a physically important conditional path, such as a microphysics adjustment or latent-heat correction.
- The tool could prioritize discrepancies according to their potential to accumulate over time or alter conserved quantities.
- Dependencies: symbolic or semantic understanding of physical code, access to model metadata, and long-horizon experiments. The current study identifies such cases but does not automate their physical interpretation.
- Explicit-memory and asynchronous optimization after validated porting — GPU performance engineering
- Replace the initial Unified Memory implementation with optimized OpenACC data regions, asynchronous execution, kernel fusion, communication overlap, and improved data layouts.
- These changes could improve on the demonstrated 5.1× speedup and reduce CPU–GPU page migration.
- Dependencies: every optimization may change execution order or data dependencies and therefore requires a stronger validation strategy than the initial port. The paper deliberately excludes these aggressive optimizations.
- Portable modernization across GPU vendors and programming models — HPC portability
- Translate the workflow beyond NVIDIA/OpenACC to alternatives such as CUDA Fortran, OpenMP target offload, HIP, SYCL, or vendor-neutral directive models.
- A portable artifact format for kernel inputs, reference outputs, and validation specifications could allow the same scientific test suite to be used across systems.
- Dependencies: compiler maturity, portability of intrinsic functions, differences in floating-point behavior, and performance portability across architectures.
- Institutional policy for trustworthy AI-assisted scientific computing — research governance
- Establish policies requiring AI-modified scientific code to include:
- provenance of generated changes,
- human review,
- reproducible reference tests,
- kernel- and application-level validation,
- documented numerical tolerances, and
- rollback to a trusted CPU implementation.
- Such policies could become part of research software certification, supercomputing allocation requirements, or reproducibility checklists.
- Dependencies: agreement among research institutions, funding agencies, software maintainers, and domain communities on acceptable evidence of scientific validity.
- Scientific digital twins and decision-support systems — urban planning, infrastructure, and daily life
- In the longer term, validated GPU ports of weather and environmental models could power higher-resolution digital twins for cities, transportation networks, agriculture, renewable-energy forecasting, and flood-risk management.
- End users could receive more timely local forecasts or scenario analyses through public dashboards and automated alerts.
- Dependencies: robust coupling to observational data, operational reliability, uncertainty communication, cybersecurity, and careful distinction between model outputs and guaranteed predictions.
Glossary
- Accumulated numerical effects: Numerical differences that build up over repeated simulation steps. “physically evolved states in which major physical processes and accumulated numerical effects are more likely to appear.”
- Application-level validation: Verification of the behavior of the fully integrated scientific application. “Application-level validation is also necessary because a difference that appears acceptable for a single snapshot may still affect the long-term behavior of the integrated simulation.”
- Asynchronous execution: Computation that proceeds concurrently with other operations without waiting for their completion. “These optimizations require a different validation strategy and are therefore treated as future work.”
- Binary-data conventions: Rules governing the representation and interpretation of binary data, such as byte ordering. “which binary-data conventions, such as byte-order conversion, are required to interpret dumped data correctly.”
- Bitwise disagreement: A difference between computational results at the level of individual binary bits. “Therefore, bitwise disagreement between CPU and GPU outputs does not immediately imply an implementation error.”
- Cancellation effects: Loss of numerical precision caused when nearly equal values are subtracted. “including threshold-sensitive branch divergence and cancellation effects”
- Cloud microphysics: Modeling of processes involving cloud formation, droplets, ice, and precipitation particles. “Major physical processes in CReSS, including cloud microphysics, radiation, turbulence, and surface processes, are enabled.”
- Conditional allocation: Allocating memory only when a specified condition or configuration is active. “Such information may depend on initialization routines, physics options, conditional allocation, and global configuration rather than on the syntax of the target loop alone.”
- Conditional compilation: Selecting source-code sections for compilation based on compile-time conditions. “Validated GPU kernels are then integrated into the original application using conditional compilation.”
- Context-window pressure: The difficulty of fitting all relevant code, state, and conversational information within an AI model’s context limit. “This locality reduces context-window pressure and makes recovery across session boundaries easier.”
- Coarse-grained parallelism: Parallelism expressed through relatively large, independent computational units. “the existing OpenMP parallelization provides evidence of coarse-grained parallelism.”
- Computational kernel: A focused computational unit, often a loop or routine, suitable for independent execution or optimization. “These OpenMP regions form the primary computational units considered in this study.”
- Convective systems: Atmospheric systems involving rising warm air and associated cloud and precipitation formation. “has been used in studies of tropical cyclones, heavy rainfall, convective systems, and other severe weather phenomena.”
- Cancellation: A numerical phenomenon in which subtraction of similar quantities reduces significant precision. “intermediate values differed by about 25 ulps, suggesting an intrinsic-function implementation difference rather than a simple one-ulp rounding effect.”
- Directive-based GPU porting: Adapting code for GPU execution by adding compiler directives rather than extensively rewriting the program. “This makes directive-based GPU porting using OpenACC a practical first target.”
- Dump-based validation: Validation using saved program states and outputs captured during an actual simulation. “The workflow uses a variable_list as an intermediate artifact for runtime-state reconstruction.”
- Element-wise comparison: Comparing corresponding individual elements of two arrays or datasets. “the GPU output is compared element by element against the reference output.”
- Execution context: The runtime conditions, data, configuration, and preceding operations required for a computation to behave correctly. “These conditions are part of the execution context of the original application.”
- Floating-point differences: Numerical discrepancies resulting from finite-precision arithmetic and different execution orders or implementations. “Floating-point differences are not unique to GPUs; they are inherent to parallel numerical computing.”
- Grid Point Value (GPV) data: Meteorological data specifying atmospheric variables at discrete spatial grid points. “Initial and boundary conditions are derived from real Grid Point Value (GPV) data.”
- Hybrid MPI/OpenMP parallelization: A parallel programming approach combining distributed-memory MPI processes with shared-memory OpenMP threads. “a legacy weather simulation code written in Fortran with hybrid MPI/OpenMP parallelization.”
- Intrinsic function: A function supplied as part of a programming language or compiler environment, often implementing mathematical operations. “differences caused by intrinsic functions or changes in evaluation order.”
- Kernel-level validation: Validation of an individual computational kernel independently from the complete application. “For this reason, both kernel-level validation and application-level validation are needed.”
- Loop nest: A set of loops enclosed within one another. “Many target regions in CReSS are structured-grid loop nests over three-dimensional fields”
- Memory-bandwidth bound: Limited primarily by the rate at which data can be moved through memory rather than by arithmetic throughput. “the dominant kernels are primarily memory-bandwidth bound.”
- Numerical discrepancy: A difference between numerical results that may arise from computation-order or precision effects. “Only discrepancies that remain after such checks are treated as numerical discrepancies requiring human interpretation”
- Numerical validation: Assessment of whether computed numerical differences are acceptable for the intended scientific use. “GPU porting also requires validation of numerical results.”
- OpenACC: A directive-based programming model for accelerating code on GPUs and other accelerators. “The GPU version is compiled using nvfortran with OpenACC directives and Unified Memory (-gpu=managed).”
- OpenMP parallel region: A section of code executed by multiple OpenMP threads. “Among the 387 OpenMP parallel regions in CReSS, 162 regions are executed in the target validation scenario.”
- Runtime-state reconstruction: Recreating the data and execution conditions present when a kernel ran in the original application. “Runtime-state reconstruction is itself a major challenge.”
- Single precision: A floating-point representation typically using 32 bits. “Because the target CReSS configuration uses single precision, we set the tolerance to in both stages.”
- Snapshot-based kernel validation: Validation performed using a kernel’s inputs and outputs captured at one selected simulation state. “This was necessary because the snapshot-based kernel validation does not cover all execution states that appear during the full time evolution of the simulation.”
- Structured grid: A computational grid whose points follow a regular, indexed arrangement. “Many target regions in CReSS are structured-grid loop nests over three-dimensional fields”
- Threshold-sensitive branch: A conditional branch whose result can change because of a small numerical difference near a threshold. “These discrepancies were not identified as GPU implementation bugs.”
- Unified Memory: A memory model that presents CPU and GPU memory through a shared address space and manages data movement automatically. “For data management, we use Unified Memory (-gpu=managed) rather than explicit OpenACC data directives.”
- Ulp: A unit in the last place, measuring the spacing between adjacent floating-point values at a given magnitude. “The GPU computation produced K (a difference of one ulp in single precision)”
- Verification-centric workflow: A development process organized around systematically checking transformed code against expected behavior. “This study constructs a verification-centric AI-assisted GPU porting workflow for CReSS.”
- Wall-clock development cost: The actual elapsed time required to complete a development process. “Our goal is to obtain a numerically validated GPU implementation within practical wall-clock cost”
- Weather simulation: Numerical modeling of atmospheric processes over space and time. “the cloud-resolving weather simulation model targeted in this study”
