Project SynxFlow: A Seamless Transition From CUDA To SYCL

 

The Project SynxFlow


CUDA, C++, and Python versions of the open-source GPU-based hydrodynamic flood simulation program SynxFlow Python is used for data pre-processing and visualization, and CUDA is used for simulation execution. SynxFlow can model floods quicker than real-time with hundreds of millions of computational cells and metre-level precision on several GPUs. An open-source software with a simple Python interface, it may be incorporated into data science workflows for disaster risk assessments. The model has been widely applied in research and industry, such as to help flood early warning systems and develop flood maps for (re)insurance corporations.


Flooding, debris flow, and landslide runout may all be simulated with SynxFlow. Planning and managing emergency services requires the use of simulations. A comprehensive prediction of natural disasters can lessen their social and economic consequences. In addition to risk assessment and disaster preparedness, SynxFlow flood simulation can help with urban planning, environmental protection, climate change adaptation, insurance and financial planning, infrastructure design and engineering, public awareness, and education.


Issue Statement


Several characteristics make probabilistic flood forecasting computationally difficult:



  • Storage, retrieval, and administration of large datasets
  • Complex real-time data processing requires high-performance compute.
  • Model calibration and validation needed as real-world conditions change.
  • Effective integration and data transfer between hydrological, hydraulic, and meteorological models, and more.

For quicker results, a flood forecasting system must process data in parallel and offload compute-intensive activities to hardware accelerators. Thus, the SynxFlow team needs use larger supercomputers to expand flood simulation scale and minimize simulation time. DAWN, the UK’s newest supercomputer, leverages Intel GPUs, which SynxFlow didn’t support.



These challenges offered researchers a fresh target to make the SynxFlow model performance-portable and scalable on supercomputers with multi-vendor GPUs. They must migrate SynxFlow code from CUDA to a cross-vendor programming language in weeks, not years.

Solution Powered by oneAPI

After reviewing numerous choices, the SynxFlow project team chose the Intel oneAPI Base Toolkit implementation of the Unified Acceleration Foundation-backed oneAPI protocol. All are developed on multiarchitecture, multi-vendor SYCL framework. It supports Intel, NVIDIA, and AMD GPUs and contains the Intel DPC++ Compatibility Tool for automated CUDA-to-SYCL code translation

SynxFlow code migration went smoothly. This developed code that automatically translated most CUDA kernels and API calls into SYCL. After auto-translation, some problems were detected during compilation, but the migration tool’s error-diagnostic indications and warnings made them straightforward to resolve. It took longer to move from NVIDIA Collective Communications Library (NCCL)-based inter-GPU communication to GPU-direct enabled Intel MPI library calls because this could not be automated.



To recap, there has been a promising attempt to move a difficult flood simulation code that was written on CUDA to SYCL, delivering both scalability and performance-portability. The switch has been straightforward to handle and seamless owing to the Intel oneAPI Base Toolkit.



Intel organized a oneAPI Hackfest at the DiRAC HPC Research Facility

DiRAC

The High Performance Super Computer facility in the United Kingdom servicing the theoretical communities of Particle Physics, Astrophysics, Cosmology, Solar System and Planetary Science, and Nuclear Physics.



DiRAC’s three HPC services Extreme Scaling, Memory-Intensive, and Data-Intensive are each designed to support the unique kinds of computational workflows required to carry out their science program. DiRAC maintains a high emphasis on innovation, and all of its services are co-designed with vendor partners, technical and software engineering teams, and research community.

Training Series on oneAPI at DiRAC Hackfest

On May 21–23, 2024, the DiRAC community sponsored three half-day remote training sessions on the Intel oneAPI Base Toolkit. The training series was developed for developers and/or researchers with varied degrees of experience, ranging from novices to experts.

The cross-platform compatible SYCL programming framework served as the foundation for a range of concepts that were taught to the attendees. The students were also introduced to a number of Base Kit component tools and libraries that assist SYCL. For instance, the Intel DPC++ Compatibility Tool facilitates automated code migration from CUDA to C++ with SYCL; the Intel oneAPI Math Kernel Library (oneMKL) optimizes math operations; the Intel oneAPI Deep Neural Networks (oneDNN) accelerates hackfest and the Intel oneAPI DPC++ Library (oneDPL) expedites SYCL kernels on a variety of hardware. Additionally, the training sessions covered code profiling and the use of Intel Advisor and Intel VTune Profiler, two tools included in the Base Kit for analyzing performance bottlenecks.

DiRAC Hackfest’s oneAPI Hackath on


In order to complete a range of tasks, including parallelizing Fortran code on Intel GPUs, accelerating math operations like the Fast Fourier Transform (FFT) using oneMKL’s SYCL API, and resolving performance bottlenecks with the aid of Intel Advisor and Intel VTune Profiler, the participants improvised their cutting-edge projects using oneAPI tools and libraries.

The participants reported that it was easy to adjust to using oneAPI components and that the code migration process went smoothly. The teams saw a noticeable increase in workload performance with libraries like Intel MPI. Approximately 70% of the teams who took part indicated that they would be open to using oneAPI technologies to further optimize the code for their research projects. Thirty percent of the teams benchmarked their outcomes using SYCL and oneAPI, and they achieved a 100% success rate in code conversion to SYCL.

Start Programming Multiarchitecture Using SYCL and oneAPI


Investigate the SYCL framework and oneAPI toolkits now for multiarchitecture development that is accelerated! Use oneAPI to enable cross-platform parallelism in your apps and move your workloads to SYCL for high-performance heterogeneous computing.



Intel invite you to review the real-world code migration application samples found in the CUDA to SYCL catalog. Investigate the AI, HPC, and rendering solutions available in Intel’s software portfolio driven by oneAPI.

Post a Comment

0 Comments