Slow TRANSFER performance with PGI

Questions on using the PGI Compilers and Tools
Post Reply
yboetzel
Posts: 7
Joined: Nov 26 2019

Slow TRANSFER performance with PGI

Post by yboetzel » Tue Nov 26, 2019 9:58 am

Hi

I'm a software developer at MeteoSwiss, where we are currently in the process of moving our numerical weather model from Cray to PGI compiler. We were having a few performance problems, though most are solved now. One thing we noticed, is that the Fortran TRANSFER function is really slow with pgi. We use this function in a critical part of our output, to cast an array to a stream of bits, and we observe a 10-20x slowdown in that part compared to cray compiler. We were wondering if we are missing some option that we didn't set during compilation, or why the PGI implementation is so much slower.

To isolate this I prepared an example: https://pastebin.com/t5n1Z6z9

Compiling with 'pgfortran -O3 -o transfer transfer.f90' and running this on our machine I get a time of around 10s per call to TRANSFER, for a total runtime of ~20s. Comparing this to gnu and cray, I get 1.3s and 1.1s total runtime, respectively. This means the PGI version is a factor of 10-20x slower.


Thanks
Yannick

mkcolg
Posts: 8137
Joined: Jun 30 2004

Re: Slow TRANSFER performance with PGI

Post by mkcolg » Tue Nov 26, 2019 10:34 am

Thanks Yannick. I was able to reproduce the problem here so have added a problem report, TPR #27876, and sent it to our engineers for further investigation.

-Mat

yboetzel
Posts: 7
Joined: Nov 26 2019

Re: Slow TRANSFER performance with PGI

Post by yboetzel » Wed Nov 27, 2019 12:23 am

Hi Mat, thanks for the quick response! Keep me in the loop if you have a fix or workaround. This could possibly save us 2-3min of total runtime (~5%) in our model.

Post Reply