From: Rick K. <rk...@nc...> - 2005-12-14 22:45:28
|
Giuseppe, You will want to include -lpshwpc and -lperfsuite in your link line, after the -lpshwpc_mpi. Those libraries have the externals that are missing. Also, just to clarify, libpshwpc_mpi is a PMPI-based interface. There is no need to add any calls to PerfSuite if you link with that (it's likely it will result in a runtime error, actually). So in summary: If you add calls to pshwpc (as you have done): -lpshwpc -lperfsuite -lpapi If you do not, and it is an MPI program: -lpshwpc_mpi -lpshwpc -lperfsuite -lpapi Plus you may need to adjust the MPI libraries linked in for the MPI profiling interface, which is independent of PerfSuite. Good luck, Rick On Wed, 14 Dec 2005, Giuseppe Grieco wrote: > Dear Rick, > > I am following to try to use perfsuite with mpi, but without success. > What I do is editing the file cpi-mpif.f present in the folder > /examples/cpi/ by inserting calls to the four subroutine of psrun. It > makes the object file but does not links correctly. What I am doing is > the following > > % /usr/local/mpich-1.2.7/build/linux_intel/bin/mpif90 cpi-mpif.f > -static -o cpi -I/opt/perfsuite_intel/include -L/opt/perfsuite_intel/lib > -L/usr/local/lib -lpshwpc_mpi -lpapi > > The answer is > > IPO Error: unresolved : psf_hwpc_init_ > Referenced in cpi-mpif.o > IPO Error: unresolved : psf_hwpc_start_ > Referenced in cpi-mpif.o > IPO Error: unresolved : psf_hwpc_stop_ > Referenced in cpi-mpif.o > IPO Error: unresolved : psf_hwpc_shutdown_ > Referenced in cpi-mpif.o > IPO Error: unresolved : ps_hwpc_init > Referenced in libpshwpc_mpi.a(libpshwpc_mpi_a-hwpc-mpi.o) > IPO Error: unresolved : ps_hwpc_start > Referenced in libpshwpc_mpi.a(libpshwpc_mpi_a-hwpc-mpi.o) > IPO Error: unresolved : _ps_malloc > Referenced in libpshwpc_mpi.a(libpshwpc_mpi_a-hwpc-mpi.o) > IPO Error: unresolved : ps_hwpc_stop > Referenced in libpshwpc_mpi.a(libpshwpc_mpi_a-hwpc-mpi.o) > IPO Error: unresolved : ps_hwpc_shutdown > Referenced in libpshwpc_mpi.a(libpshwpc_mpi_a-hwpc-mpi.o) > IPO Error: unresolved : _ps_getargs > Referenced in libpshwpc_mpi.a(libpshwpc_mpi_a-hwpc-mpi.o) > cpi-mpif.o(.text+0x3d): In function `MAIN__': > : undefined reference to `psf_hwpc_init_' > cpi-mpif.o(.text+0x10e): In function `MAIN__': > : undefined reference to `psf_hwpc_start_' > cpi-mpif.o(.text+0x1a7): In function `MAIN__': > : undefined reference to `psf_hwpc_stop_' > cpi-mpif.o(.text+0x1c0): In function `MAIN__': > : undefined reference to `psf_hwpc_shutdown_' > /opt/perfsuite_intel/lib/libpshwpc_mpi.a(libpshwpc_mpi_a-hwpc-mpi.o)(.text+0x2d): > In function `MPI_Init': > /opt/perfsuite-0.6.1/src/libpshwpc/hwpc-mpi.c:88: undefined reference to > `ps_hwpc_init' > /opt/perfsuite_intel/lib/libpshwpc_mpi.a(libpshwpc_mpi_a-hwpc-mpi.o)(.text+0x36):/opt/perfsuite-0.6.1/src/libpshwpc/hwpc-mpi.c:90: > undefined reference to `ps_hwpc_start' > /opt/perfsuite_intel/lib/libpshwpc_mpi.a(libpshwpc_mpi_a-hwpc-mpi.o)(.text+0xc3): > In function `MPI_Finalize': > /opt/perfsuite-0.6.1/src/libpshwpc/hwpc-mpi.c:122: undefined reference > to `_ps_malloc' > /opt/perfsuite_intel/lib/libpshwpc_mpi.a(libpshwpc_mpi_a-hwpc-mpi.o)(.text+0xf0):/opt/perfsuite-0.6.1/src/libpshwpc/hwpc-mpi.c:131: > undefined reference to `ps_hwpc_stop' > /opt/perfsuite_intel/lib/libpshwpc_mpi.a(libpshwpc_mpi_a-hwpc-mpi.o)(.text+0x10d):/opt/perfsuite-0.6.1/src/libpshwpc/hwpc-mpi.c:133: > undefined reference to `ps_hwpc_shutdown' > /opt/perfsuite_intel/lib/libpshwpc_mpi.a(libpshwpc_mpi_a-hwpc-mpi.o)(.text+0x137): > In function `mpi_init_': > /opt/perfsuite-0.6.1/src/libpshwpc/hwpc-mpi.c:155: undefined reference > to `_ps_getargs' > > Thanks, Giuseppe. > > > > > ------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. Do you grep through log files > for problems? Stop! Download the new AJAX search engine that makes > searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! > http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click > _______________________________________________ > PerfSuite-users mailing list > Per...@li... > https://lists.sourceforge.net/lists/listinfo/perfsuite-users > |