Little bit more background/context would help. <div><br></div><div>Do you try to compile an all static library? If so you of course need a static library of fftw. If it is not all static it normally should accept the dynamic fftw. Then please give us the full configure line, the gcc command line of the link step and the full error message.</div>

<div><br></div><div>Roland<br><br><div class="gmail_quote">On Fri, Nov 12, 2010 at 12:17 PM, Yudong Sun <span dir="ltr">&lt;<a href="mailto:yudong@nag.co.uk">yudong@nag.co.uk</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

Mark Abraham wrote, On 12/11/2010 17:02:<div><div></div><div class="h5"><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 13/11/2010 3:15 AM, Yudong Sun wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<br>
I have some troubles when compiling GROMACS 4.5.3 using PGI compiler<br>
on the -rpath flag and also a static link to dynamic libfftw3.so.<br>
<br>
I use the pre-installed FFTW 3.2.2.1 library on my Linux system. The<br>
FFTW library is managed by the Modules package. The fftw module<br>
automatically sets the environ variable as:<br>
<br>
FFTW_POST_LINK_OPTS = -L/opt/fftw/<a href="http://3.2.2.1/lib" target="_blank">3.2.2.1/lib</a><br>
-Wl,-rpath=/opt/fftw/<a href="http://3.2.2.1/lib" target="_blank">3.2.2.1/lib</a> -lfftw3 -lfftw3f<br>
</blockquote>
<br>
So how does configure use this information? (hint: providing the<br>
configure command line is essential for us to understand any context!)<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
When compiling, an error occurs on the -rpath:<br>
<br>
pgcc -fast -o grompp grompp.o ./.libs/libgmxpreprocess_mpi_d.a<br>
/usr/local/packages/nag/GROMACS/gromacs-4.5.3/src/mdlib/.libs/libmd_mpi_d.a<br>
../mdlib/.libs/libmd_mpi_d.a /opt/fftw/<a href="http://3.2.2.1/lib/libfftw3.so" target="_blank">3.2.2.1/lib/libfftw3.so</a><br>
/usr/local/packages/nag/GROMACS/gromacs-4.5.3/src/gmxlib/.libs/libgmx_mpi_d.a<br>
../gmxlib/.libs/libgmx_mpi_d.a -ldl -lnsl -lm --rpath<br>
/opt/fftw/<a href="http://3.2.2.1/lib" target="_blank">3.2.2.1/lib</a> --rpath /opt/fftw/<a href="http://3.2.2.1/lib" target="_blank">3.2.2.1/lib</a><br>
pgcc-Error-Unknown switch: --rpath<br>
pgcc-Error-Unknown switch: --rpath<br>
<br>
Pgcc doesn&#39;t recognize --rpath. The correct format is a single dash<br>
only -rpath.<br>
</blockquote>
<br>
Sounds like configure isn&#39;t handling pgcc properly. However, GROMACS is<br>
using very vanilla autoconf stuff, so I&#39;m strongly of the opinion that<br>
the problem isn&#39;t on the GROMACS side.<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
If I manually remove the extra &#39;-&#39; (-rpath /opt/fftw/<a href="http://3.2.2.1/lib" target="_blank">3.2.2.1/lib</a>) and<br>
rerun the command line, a link error appears:<br>
<br>
/usr/bin/ld: attempted static link of dynamic object<br>
`/opt/fftw/<a href="http://3.2.2.1/lib/libfftw3.so" target="_blank">3.2.2.1/lib/libfftw3.so</a>&#39;<br>
<br>
The command line links the dynamic fftw library. As the &#39;configure<br>
--help&#39; shows the default is a static build. Why doesn&#39;t the configure<br>
pick the libfftw3.a but the libfftw3.so? The fftw library on my system<br>
contains both static and dynamic libraries.<br>
</blockquote>
<br>
Don&#39;t know. Ask the autoconf list.<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
I have also tried to make the old GROMACS 4.0.7 which has shown the<br>
same problems as above.<br>
<br>
Any workarounds to the problems or what options should I pass to the<br>
configure?<br>
</blockquote>
<br>
Don&#39;t bother with PGI compilers. GROMACS performance is 99%<br>
compiler-independent, thanks to hand-coded assembly for the inner loops.<br>
Use gcc.<br>
<br>
</blockquote>
<br></div></div>
I have tried GCC. It has the same static link problem:<div class="im"><br>
<br>
attempted static link of dynamic object `/opt/fftw/<a href="http://3.2.2.1/lib/libfftw3.so" target="_blank">3.2.2.1/lib/libfftw3.so</a>&#39;<br>
<br></div>
Yudong<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Mark<br>
</blockquote>
<br>
________________________________________________________________________<br>
The Numerical Algorithms Group Ltd is a company registered in England<br>
and Wales with company number 1249803. The registered office is:<br>
Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom.<br>
<br>
This e-mail has been scanned for all viruses by Star. The service is<br>
powered by MessageLabs. ________________________________________________________________________<div><div></div><div class="h5"><br>
-- <br>
gmx-users mailing list    <a href="mailto:gmx-users@gromacs.org" target="_blank">gmx-users@gromacs.org</a><br>
<a href="http://lists.gromacs.org/mailman/listinfo/gmx-users" target="_blank">http://lists.gromacs.org/mailman/listinfo/gmx-users</a><br>
Please search the archive at <a href="http://www.gromacs.org/Support/Mailing_Lists/Search" target="_blank">http://www.gromacs.org/Support/Mailing_Lists/Search</a> before posting!<br>
Please don&#39;t post (un)subscribe requests to the list. Use the www interface or send it to <a href="mailto:gmx-users-request@gromacs.org" target="_blank">gmx-users-request@gromacs.org</a>.<br>
Can&#39;t post? Read <a href="http://www.gromacs.org/Support/Mailing_Lists" target="_blank">http://www.gromacs.org/Support/Mailing_Lists</a><br>
<br>
<br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>ORNL/UT Center for Molecular Biophysics <a href="http://cmb.ornl.gov">cmb.ornl.gov</a><br>865-241-1537, ORNL PO BOX 2008 MS6309<br>
</div>