How to use correctly use -OPT:Olimit

In my recent travails with the accelerators, I ran into this:

/tmp/pgnvdT51chOBcZJwO.nv4(0): Warning: Olimit was exceeded on function soluv_836_gpu; will not perform function-scope optimization.
To still perform function-scope optimization, use -OPT:Olimit=0 (no limit) or -OPT:Olimit=58556
/tmp/pgnvdT51chOBcZJwO.nv4(0): Warning: To override Olimit for all functions in file, use -OPT:Olimit=58556
(Compiler may run out of memory or run very slowly for large Olimit values)

Now, the file I’m trying to compile is a result of a rather massive undertaking of inlining subroutines and loop fusion, so I can see how I might break a limit.

My problem is, I can’t seem to get this to work. When I try to compile with, say, the 58556 number:

> pgfortran -fast -Minfo=all,accel -r4 -Mextend -Mpreprocess -Ktrap=fp -ta=nvidia,time -OPT:Olimit=58556 -c src/sorad.reloopbest-inline-noaero.dpdeledd.f
pgfortran-Warning-Malformed $expr(), nonnumeric value PT:Olimit=58556
pgfortran-Warning-Malformed $expr(), nonnumeric value PT:Olimit=58556
pgfortran-Warning-Malformed $expr(), nonnumeric value PT:Olimit=58556
pgfortran-Warning-Malformed $expr(), nonnumeric value PT:Olimit=58556
pgfortran-Warning-Malformed $expr(), nonnumeric value PT:Olimit=58556
pgfortran-Warning-Malformed $expr(), nonnumeric value PT:Olimit=58556
pgfortran-Warning-Malformed $expr(), nonnumeric value PT:Olimit=58556
pgfortran-Warning-Malformed $expr(), nonnumeric value PT:Olimit=58556
pgfortran-Warning-Malformed $expr(), nonnumeric value PT:Olimit=58556
pgfortran-Warning-Malformed $expr(), nonnumeric value PT:Olimit=58556
pgfortran-Error-Illegal option to -O:PT:Olimit=58556

Huh. This happens whether the -OPT:Olimit call is the first option after pgfortran or the last. I thought it might have been a shell issue, but it occurs under tcsh and bash. And, yes, it happens if I use Olimit=0.

Is there a special way I need to delimit this option so that the compiler can read it? From what I can see, it seems like it’s reading -OPT as -O and trying to optimize at level “PT:Olimit=58856”, which isn’t quite an integer.

Matt

Hi Matt,

“-OPT:Olimit=58556” is an open64 flag (the base compiler for nvcc) and why our driver doesn’t recognize it.

We currently don’t have a way for you to pass in nvcc flags. Though, we have started a need for this and have begun internal discussions on how best to add this support.

Best Regards,
Mat

That answers that. If you need external votes, hand raised.

I guess I now have an excuse to remove the bits in this subroutine that involve a real->dble->real transformation. (I’ve mainly done that in the past because it takes the accelerator-compiler 5+ minutes to figure out this section when it’s in DP mode.)

(Oh. Do you know if this limit is “raised” with CUDA 3.0 Beta? That is, the default Olimit was raised because “time marches on”? I’ve held off on installing that because, well, “beta”.)