Error while Compiling

Hi
I compiled my code using pgf90. If i compile the code without -r8 -fast option, its compiled fine. But if i put pgf90 -r8 -fast, its giving following error.
[velan@galaxy FEN15_02]$ /share/apps/BENCH/ETH/PGF90/mpich2-1.0.5p4+PGI/bin/mpif90 -r8 -fast -Mextend ramp2.f -o BENCH/pgf90eth.exe
ramp2.f:

pgf90-Fatal-/share/apps/pgi/linux86/7.0-5/bin/newcg/pgf902 TERMINATED by signal 11
Arguments to /share/apps/pgi/linux86/7.0-5/bin/newcg/pgf902
/share/apps/pgi/linux86/7.0-5/bin/newcg/pgf902 /home/velan/3DSIM/MULTIBLOCK/CODE/FEN15_02/TMP/pgf90JdebPpjrTmRT.ilm -fn ramp2.f -opt 2 -terse 1 -inform warn -x 51 0x20 -x 119 0xa10000 -x 119 0x100000 -x 122 0x40 -x 123 0x1000 -x 127 4 -x 127 16 -x 119 0x40000000 -x 19 0x400000 -x 28 0x40000 -x 70 0x8000 -x 122 1 -x 59 4 -tp piv -x 124 0x1400 -y 15 2 -x 57 0x3b0000 -x 58 0x48000000 -astype 0 -x 121 1 -x 124 1 -x 9 1 -x 42 0x14200000 -x 72 0x1 -x 136 0x11 -cmdline ‘+pgf90 ramp2.f -r8 -fast -Mextend -o BENCH/pgf90eth.exe -I/share/apps/BENCH/ETH/PGF90/mpich2-1.0.5p4+PGI//include -I/share/apps/BENCH/ETH/PGF90/mpich2-1.0.5p4+PGI//include -L/share/apps/BENCH/ETH/PGF90/mpich2-1.0.5p4+PGI//lib -lmpichf90 -lmpichf90 -lmpich -lpthread -lrt’ -asm /home/velan/3DSIM/MULTIBLOCK/CODE/FEN15_02/TMP/pgf907debXmZ3jbPZ.s
[velan@galaxy FEN15_02]$


I export my temp dir to my home directory. Even though its giving error. I not able to figure it out the problem. Can you please help me to solve it.

Thanks
Velan

Hi Velan,

Can you please send a report to trs@pgroup.com and include the source file which causes the problem?

Thanks,
Mat

Because of proprietory reason I am not able to send the source code at
this point. I will check with my advisor regarding this.

The same code has been compiled using pgf90 -r8 -fast on a University of
Minnesota machine and it works fine there.

Is there anyother way to figure it out?

Thanks
Velan

Hi Velan,

Unfortunately without the source, the best I can do is help you work around the compiler problem.

What version of the compiler are they using at the University of Minnesota?
Are any other flags being added by your mpif90 script? (i.e. ‘share/apps/BENCH/ETH/PGF90/mpich2-1.0.5p4+PGI/bin/mpif90 -show’)

Try narrowing down which option is causing the problem using the following:
-r8 -O0
-r8 -O1
-r8 -O2
-r8 -O2 -Munroll=c:1
-r8 -O2 -Munroll=c:1 -Mlre
-r8 -O2 -Munroll=c:1 -Mlre -Mautoinline
-r8 -O2 -Munroll=c:1 -Mlre -Mautoinline -Msmart
-r8 -O2 -Munroll=c:1 -Mlre -Mautoinline -Msmart -Mvect=sse,altcode (this is roughly equivlent to “-fast” in 64-bits)

Thanks,
Mat

Hi Mat

-r8 -O2 -Munroll=c:1 -Mlre causing trouble. Before this option, it was working fine.

[velan@galaxy FEN15_02]$ /share/apps/BENCH/ETH/PGF90/mpich2-1.0.5p4+PGI/bin/mpif90 -r8 -O2 -Munroll=c:1 -Mlre pg3d.f
pg3d.f:
NOTE: your trial license will expire in 7 days, 9.48 hours.
NOTE: your trial license will expire in 7 days, 9.48 hours.
pgf90-Fatal-/share/apps/pgi/linux86/7.0-5/bin/newcg/pgf902 TERMINATED by signal 11
Arguments to /share/apps/pgi/linux86/7.0-5/bin/newcg/pgf902
/share/apps/pgi/linux86/7.0-5/bin/newcg/pgf902 /tmp/pgf90r5EeZ-hipDhv.ilm -fn pg3d.f -opt 2 -terse 1 -inform warn -x 51 0x20 -x 119 0xa10000 -x 119 0x100000 -x 122 0x40 -x 123 0x1000 -x 127 4 -x 127 16 -x 119 0x40000000 -x 19 0x400000 -x 28 0x40000 -x 70 0x8000 -x 122 1 -x 59 4 -tp piv -x 124 0x1400 -y 15 2 -x 57 0x3b0000 -x 58 0x48000000 -astype 0 -x 124 1 -x 9 1 -y 10 0 -x 42 0x14200000 -cmdline ‘+pgf90 pg3d.f -r8 -O2 -Munroll=c:1 -Mlre -I/share/apps/BENCH/ETH/PGF90/mpich2-1.0.5p4+PGI//include -I/share/apps/BENCH/ETH/PGF90/mpich2-1.0.5p4+PGI//include -L/share/apps/BENCH/ETH/PGF90/mpich2-1.0.5p4+PGI//lib -lmpichf90 -lmpichf90 -lmpich -lpthread -lrt’ -asm /tmp/pgf90z5Eel_N1mCNd.s
[velan@galaxy FEN15_02]$


In Minnesota Machine, the version of mpif90 shows
head% mpif90 -show
ln -s /opt/pscale/gmpi.pgi4.1-2/include/mpif.h mpif.h
pgf90 -L/opt/pscale/gmpi.pgi4.1-2/lib -lmpichf90 -lmpich -L/usr/gm/binary/lib/ -L/usr/gm/lib/ -lgm -lpthread
rm -f mpif.h


Thanks
Velan

Hi Velan,

You could use “-r8 -O2”, “-r8 -fast -Mnolre”, “-r8 -fast -Mnounroll”, or “-r8 -fast -Mnounroll -Mnolre”.

Please do ask your adviser about sending us the code. This is severe compiler error and we would like to be able to diagnosis and fix the problem as soon as possible.

Thanks!
Mat

Hi Mat
I tried all option which you send previous message. But i am getting error while compiling with “mpif90 -Mextend -r8 -fast -Mnounroll pg3d.f”

[velan@galaxy FEN15_02]$ /share/apps/BENCH/ETH/PGF90/mpich2-1.0.5p4+PGI/bin/mpif90 -r8 -fast -Mnounroll pg3d.f
pg3d.f:
NOTE: your trial license will expire in 6 days, 23.9 hours.
NOTE: your trial license will expire in 6 days, 23.9 hours.
pgf90-Fatal-/share/apps/pgi/linux86/7.0-5/bin/newcg/pgf902 TERMINATED by signal 11
Arguments to /share/apps/pgi/linux86/7.0-5/bin/newcg/pgf902
/share/apps/pgi/linux86/7.0-5/bin/newcg/pgf902 /tmp/pgf90JcdfPGqIqabX.ilm -fn pg3d.f -opt 2 -terse 1 -inform warn -x 51 0x20 -x 119 0xa10000 -x 119 0x100000 -x 122 0x40 -x 123 0x1000 -x 127 4 -x 127 16 -x 119 0x40000000 -x 19 0x400000 -x 28 0x40000 -x 70 0x8000 -x 122 1 -x 59 4 -tp piv -x 124 0x1400 -y 15 2 -x 57 0x3b0000 -x 58 0x48000000 -astype 0 -x 121 1 -x 124 1 -x 9 1 -x 42 0x14200000 -x 72 0x1 -x 136 0x11 -y 9 0 -cmdline ‘+pgf90 pg3d.f -r8 -fast -Mnounroll -I/share/apps/BENCH/ETH/PGF90/mpich2-1.0.5p4+PGI//include -I/share/apps/BENCH/ETH/PGF90/mpich2-1.0.5p4+PGI//include -L/share/apps/BENCH/ETH/PGF90/mpich2-1.0.5p4+PGI//lib -lmpichf90 -lmpichf90 -lmpich -lpthread -lrt’ -asm /tmp/pgf907cdfXL0X8xTX.s


I send mail to my advisor regarding source code. I will let you know his reply.

Thanks
Velan

This means that it’s definitely LRE (Loop redundancy elimination). To work around the problem, add “-Mnolre”.

  • Mat

Hi Mat
I want to know more about LRE. Where i can find the correct soultion(means some documents which tells about it clearly)

Hi Velan,

I think I wasn’t clear before. What I meant is that when the compiler is attempting to perform the LRE optimization on your code, a compiler error causes the compilation to abnormally abort. This is not something you would be able to fix except to send sample code which exhibits the problem to trs@pgroup.com.

As for what LRE does, I don’t know of any papers on the topic, but essentially the compiler will look for variables that are used in a one iteration of a loop, that are also used in the next iteration. For example using the following psydocode:

for (i=0,N) 
   S = a[i] + a[i+1]

The value of “a[i+1]” will be used in the next iteration of loop as the value for “a_”. LRE recognizes this and carries the value of “a[i+1]” forward to the next loop. This eliminates an extra memory read. If “a[i+1]” were a calculated value, then you would save the re-calculation cost.

Hope this helps,
Mat_

Hi Mat,
After long time in confusion i found the problem. My code having following lines.

Do 100 i = 2,nx+1
Do 110 j = 2,ny+1
Do 115 k = 2,nz+1

k1 = 2
i1 = i
i2 = i+1
j1 = j
j2 = j+1
xw = 0.5d0*(x(k1,j1,i1)+x(k1,j2,i1)+x(k1,j1,i2)+x(k1,j2,i2))
i1 = i
i2 = i+1
k1 = k
k2 = k+1
j1 = 2
if(jblk.eq.4) j1 = my
xf = 0.5d0*(x(k1,j1,i1)+x(k2,j1,i1)+x(k1,j1,i2)+x(k2,j1,i2))

115 Continue
110 Continue
100 Continue

return
end


Here if i comment the “if” loop, its compiling and running fine. But if i uncomment "if " loop , its giving error while compiling(which i told in previous mail). One more interesting thing is, I added print statement before the "if " loop and i tried compiling the code with “if” loop. Now its compilied and running without any problem. Do you have any idea what is happening?

Thanks
Velan

Hi Velan,

Unfortunately, I don’t see the issue when compiling just this code snipit. Can you please send either a sample code with illustrates the problem or the full program to trs@proup.com? I’m fairly certain that is problem with the compiler, but until we’re able to recreate it here, it’s very difficult to understand the cause.

Thanks,
Mat