-Mipa Vs. -g

Hi I’m using pgCC 6.0.4 with Suse Enterprise 9.1 on opteron and I keep running into problems with -Mipa.

First things first. Compiling with -g and -Mipa cause pgCC to fail in the link step. For some reason my file input routines get messed by ipa so I’d like to be able to find out why. However, the -g with any combination of ipa flags causes the problems below.

pgCC -o dev -I./Inc -B  -O0 -Mipa -g  ./Ohmtestmain.o ./Multigrid.o ./ParticleStore.o ./Structure.o ./ContactRegion.o ./Multigrid2.o ./Flux.o ./Molecule.o ./Coefficient.o ./Grid3d.o ./Grid3d2.o ./VectorArray.o ./IntArray.o ./myArray.o ./CloneStore.o ./Matrix.o ./Atom.o ./AtomList.o ./Timer.o ./Particle.o ./DeadParticle.o ./Vector.o ./myRandom.o ./FileOP.o ./CoupledIndexStore.o ./SimConfig.o ./Estimator.o ./Trajectory.o ./CmdLine.o ./InputMolecule.o ./Parallel.o  -L ./  -lm -lrt
pgCC-Info-Switch -Mipa forces -O2
IPA: no IPA optimizations for 7 source files
IPA: Recompiling ./Ohmtestmain.o: new IPA information
pgCC-Info-Switch -Mipa forces -O2
pgCC-Fatal-/usr/local/Cluster-Apps/pgi/6.0-4/linux86-64/6.0/bin/pgcpp2 TERMINATED by signal 11
Arguments to /usr/local/Cluster-Apps/pgi/6.0-4/linux86-64/6.0/bin/pgcpp2
/usr/local/Cluster-Apps/pgi/6.0-4/linux86-64/6.0/bin/pgcpp2 Src/Ohmtestmain.cpp -debug -x 120 0x200 -opt 2 -terse 1 -inform warn -x 119 0xa10000 -x 122 0x40 -x 123 0x1000 -x 127 4 -x 19 0x400000 -quad -x 120 0x80000000 -x 59 4 -y 80 0x1000 -x 80 0x10800000 -astype 0 -fn Src/Ohmtestmain.cpp -il /Ohmtestmain.il -x 123 4 -x 89 2155874370 -x 66 0x20000 -x 14 0x104 -y 89 0x40 -ipaexport /tmp/xxipaaaaaabxsaj.x -ipaimport -ipafile ./Ohmtestmain.ipa -y 89 2 -y 14 16 -x 14 32 -x 89 0x40 -x 66 0x20000000 -cmdline '+pgCC Src/Ohmtestmain.cpp -c -B -O0 -Mipa -g -o Ohmtestmain.o -c --XIPAimport /tmp/xxipaaaaaabxsaj.x ./Ohmtestmain.ipa -o ./Ohmtestmain_ipa3_dev.o' -asm /tmp/pgCCaaaaaeDsak.s
child process exit status 127: /usr/local/Cluster-Apps/pgi/6.0-4/linux86-64/6.0/bin/pgCC
make: *** [dev] Error 2

Secondly when attemting to compile C++ code with -Mipa=fast the compiler hangs.

Any ideas anyone ? I’ve tried all of the various IPA options and no one of them appears to cause the problem. It appears to be the combination that are used in -Mipa=fast (-Mipa=align,arg,const,f90ptr,shape,globals,localarg,ptr).

Hi Cannonfodda,

Can you please send this information along with sample code to trs@pgroup.com? A compiler seg fault is a serious problem and we’ed like to get it fixed as soon as possible.

Does the problem occur without “-g”? Until we’re able to determine the problem, I’d suggest creating a debug version of the code without IPA. As a side note, IPA forces the use of “-O2” which can cause parts of your code to be optimized and thus harder to debug.

Thanks,
Mat

Hi Mat,

Hello world style program causes the seg fault too:

#include <iostream>

using namespace std;

int main()
{
    cout << "Blah" << endl;
    return 0;
}

Compiled with pgCC test.cpp -Mipa=fast -g -o ./blah
Causes the same problem as above.

No the problem only occurs when you mix the -Mipa and -g. The second problem with pgipa hanging when using -Mipa=fast occurs all of the time. I am aware that -O2 is the minimum optimisation level and it will make debugging harder. The problem is that something in the ipa is screwing up my file io routines and print statement degbugging just hasn’t worked so far since the offending read is being called waaay out of order as far as I can tell. So I was hoping to be able to figure out what is getting messed up by using the debugger :). Catch 22 methinks.

Cheers,

Campbell

Thanks Campbell. We’ve filed this as TPR#3574.

  • Mat