GFDS: CUDA Fortran GPU acceleration and a proposed experimental branch #16552
Replies: 2 comments 24 replies
|
Hi Xiao, your GPU implementation work seems very interesting. We can discuss on the implementation you have in this thread, but note we already have a research branch in firemodels (FireX). All experimental work is being added in there, including linking to GPU enabled libraries. |
|
@marcosvanella @cxp484 @ericvmueller Hi, I made a small update to make it easier to test different MPI process counts without editing the input file. The original MPI assignment rules in the FDS version used by GFDS have two restrictions: This is inconvenient for GPU testing because GPU nodes usually have far fewer GPUs than CPU cores. In some of my H20 tests, two MPI processes on one GPU were faster than one, mainly because DUMP took less time. But using too many processes can also increase GPU scheduling, MPI communication, synchronization, and MESH_EXCHANGE time. Meshes within the same process exchange data through device-memory copies. Communication between processes goes through MPI. With CUDA-aware MPI, device buffers may be transferred directly without staging through host memory. The updated rules are: The changes are in:
This is still a static, count-based assignment. It is mainly intended to make it easier to choose a more suitable number of MPI processes for GPU execution. Running 144 MPI processes on one GPU may introduce considerable overhead. With this update, you can test fewer MPI processes than meshes simply by changing Best regards, Xiaoxinming |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
GFDS: An Experimental CUDA Fortran Implementation of FDS — Seeking Feedback
Dear FDS Development Team,
Thank you for developing and maintaining FDS. I have been working on GFDS, an independent, experimental CUDA Fortran GPU implementation based on FDS, and would appreciate your feedback on the approach and possible ways to collaborate.
Implementation and Scope
GFDS focuses on GPU-resident computation within the main time-stepping loop, keeping the primary simulation data in device memory. The overall workflow is:
The original CPU execution path is retained, and both single-GPU and MPI-based multi-GPU execution are available. The current GPU implementation covers selected VLES calculations, combustion/species coupling, single-band gray-gas radiation, and non-pyrolyzing one-dimensional solid heat conduction. Pyrolysis, HVAC, and CC_IBM are not yet supported in the GPU path.
Preliminary Performance
In my preliminary tests with
simple_test-type fire cases of approximately 10 million cells, I observed a 60–80× speedup on a single NVIDIA H20 compared with FDS running on one CPU core of an AMD EPYC 9K84 96-Core Processor.A four-GPU configuration achieved 80% strong-scaling efficiency in the tested setup. Scaling depends on mesh decomposition and communication overhead, including NVLink/PCIe connectivity.
Separate tests on an NVIDIA GeForce RTX 4060 Laptop GPU showed approximately 30× acceleration. Single-precision execution provided a further speedup approaching 2× in selected tests, with similar overall trends in the quantities examined. These preliminary observations are specific to the tested configurations and do not constitute a comprehensive numerical accuracy assessment.
Verification and Codebase
I have CPU/GPU comparison cases and supporting reports available for review. The README distinguishes cases with saved CPU/GPU comparison results from engineering inputs retained for development and further verification. The available results cover selected input configurations, not all combinations of FDS models and inputs.
Development started from the June 2025 FDS codebase, and not all subsequent upstream changes have been incorporated. The current implementation builds and runs on Linux using nvfortran, MPI, and OpenMP, with changes to some source files and the CMake configuration. I have also incorporated selected fixes for compatibility with more recent Smokeview versions.
Feedback and Possible Collaboration
Would the team be open to an initial technical discussion about this work? I would welcome feedback on the implementation and on any additional comparison tests you would consider useful.
My preference is to keep this work in a separate experimental branch while development and verification continue, rather than seek mainline integration at this stage. If, after review, you consider an experimental branch in the official repository appropriate, I would be glad to discuss that possibility. Continuing in a separately maintained GFDS repository would also be an option.
Since the work has not yet been published and the source code is currently private, would there be a suitable contact for an initial non-public exchange?
Thank you for your time and consideration.
Best regards,
Xiao Xinming
Sun Yat-sen university
email adress : xiaoxm8@mail2.sysu.edu.cn
Attachment
Simple validation results.pdf
README(1)(1).md
All reactions