I installed perfsuite 0.6.1 with Intel Fortran 9.0 for Linux. I try to ru=
examples matvec-ps which links to lpshwpc and lpapi. The message I receiv=
/opt/intel/fc/9.0/lib/for_main.o(.text+0x41): In function `main':
: undefined reference to `MAIN__'
This kind of error is reported in the INSTALL file of perfsuite, and it s=
to hand-edit the config.h file with
#define F77_MAIN MAIN__
and making it again.=20
The fact is that my config.h file has this line, but the error still rema=
What to do? Thanks in advance.
Dr. Giuseppe Grieco
DIFA Universit=E0 della Basilicata
From: Rick Kufrin <rkufrin@nc...> - 2005-11-29 23:16:18
I've tried to reproduce your error today using the Intel 9.0 compilers on=
both Itanium and Xeon systems but unfortunately cannot get the same=20
behavior. That is, I get no link or runtime errors when building the
The message that you are referring to in the INSTALL file is a little bit=
confusing, I think. It is primarily directed towards problems that were=20
encountered in building the PerfSuite test suite, not example programs or=
actual user applications. The issue comes down to: how do you link=20
programs properly that mix Fortran and C? For the matvec example, this=20
should not be an issue as it is completely a Fortran program.
Can you build and run the matvec example that contains no calls to the=20
PerfSuite library? It should be as simple as doing:
# ifort -o matvec matvec.f
If you can, then we can assume your Fortran compiler is working properly.
The "MAIN_" symbol should actually be contained in your executable, in=20
this case "matvec". You can see if it is there by running the command
"nm -g matvec | grep -i main". My output for that command is:
08049b70 T main
08049bbc T MAIN__
I'll wait to hear back from you about these experiments before we try=20
further. Thanks for your patience and reports.
p.s. just to reiterate, you can ignore the sentences in the INSTALL file=20
about modifying "config.h". This was applicable only to the build of=20
PerfSuite itself. If your test suite runs to completion after you have=20
built PerfSuite (make -s check), your build should be OK. If not, then I=
would like to see your "config.log" file if you still have it available.
> I installed perfsuite 0.6.1 with Intel Fortran 9.0 for Linux. I try to =
> examples matvec-ps which links to lpshwpc and lpapi. The message I rece=
> /opt/intel/fc/9.0/lib/for_main.o(.text+0x41): In function `main':
> : undefined reference to `MAIN__'
> This kind of error is reported in the INSTALL file of perfsuite, and it=
> to hand-edit the config.h file with
> #define F77_MAIN MAIN__
> and making it again.=20
> The fact is that my config.h file has this line, but the error still re=
> What to do? Thanks in advance.
> Dr. Giuseppe Grieco
> DIFA Universit=E0 della Basilicata