海洋数值模式具有非常高的计算密度,为了提高计算速度,可以使用GPU来进行加速计算。本文即使用CUDA实现了一个非静压海洋数值模式的GPU加速计算,与CPU串行程序相比,基于GPU的程序可以在不牺牲模拟精度的前提下(相对误差不超过2×10^-3)大大提高计算效率;单精度计算的加速比最高可以达到232,双精度计算的加速比最高可以达到142。目前大部分海洋数值模式的计算都基于CPU为核心,还没有移植到GPU平台,因而无法利用GPU强大的计算能力。本文为海洋数值模式向GPU平台的移植积累了丰富的经验,计算速度的显著提高展现了海洋数值模式应用GPU进行加速的广阔前景。
The computation intensity is considerably high for ocean numerical models, and it is very ap- propriate to accelerate ocean models by exploiting the computational power of Graphics Processing Units (GPU). The GPU parallelization of a nonhydrostatic ocean numerical model using NVIDIA's Compute Unified Device Architecture (CUDA) was described in this paper. The calculation was accelerated re- markably without loss of precision (the relative error was no more than 2× 10 ^-3 on a GPU with respect to that on a CPU). The speedup could achieve 232 for single precision computation and 142 for double precision calculatiorL Unfortunately, most of the ocean numerical models had not been operated to GPU platform up to now and the powerful computing capability of GPU could not be realized at present time. This study accumula- ted rich experiences on transporting ocean numerical models from CPU to GPU platform, and it showed a good prospect to accelerate the computation of ocean numerical models by using GPU.