Ok, I think I got it. Compiled. ;)<br>
<br>
About a thousand tricks. I'll publish a tutorial later. But, basically:<br>
<span style="font-weight: bold;">1 -</span> Change all invsrt calls to gmx_inv-sqrt (57 entries, 12 files);<br>
<span style="font-weight: bold;">2 -</span> Edit the <a href="http://Makefile.in">Makefile.in</a> in the
nb_kernels directories, changing the line &quot;LTCCASCOMPILE = $(LIBTOOL)
--mode=compile $(CCAS) $(AM_CCASFLAGS) \&quot; by &quot;LTCCASCOMPILE =
$(LIBTOOL) --mode=compile --tag=CXX $(CCAS) $(AM_CCASFLAGS) \&quot; in
&quot;<a href="http://Makefile.in">Makefile.in</a>&quot; files;<br>
<span style="font-weight: bold;">3 -</span> make disclean (for safety);<br>
<span style="font-weight: bold;">4 -</span> Run the configure for &quot;gcc&quot;, BUT with the following environment and flags(at least):<br>
*************************************************************************************<br>
CPPFLAGS=-I/usr/local/lib64/fftw/gnu/include<br>
LDFLAGS=-L/usr/local/lib64/fftw/gnu/lib<br>
CC=/usr/bin/gcc<br>
CXX=/usr/local/intel/bin/icpc<br>
F77=/usr/bin/g77<br>
CFLAGS=&quot;-O3 -ffast-math -funroll-all-loops -fpeel-loops &quot;<br>
CXXFLAGS=&quot;-O3 -axP -xW &quot;<br>
F77FLAGS=&quot;-O3 -ffast-math -funroll-all-loops -fpeel-loops &quot;<br>
*************************************************************************************<br>
<span style="font-weight: bold;">5 -</span> SAVE the Makefile from nb_kernels directories; special care for the one your compilation will use for sure (machine dependent);<br>
<span style="font-weight: bold;">6 -</span> make distcean (for necessity)<br>
<span style="font-weight: bold;">7 -</span> Now, run again configure for intel compilers, with the new environment and flags (at least) below:<br>
**************************************************************************************************<br>
PATH=&quot;$PATH /usr/local/intel/bin/ . /usr/local/intel/lib/&quot;<br>
LD_LIBRARY_PATH=/usr/local/intel/lib/<br>
CPPFLAGS=-I/usr/local/lib64/fftw/intel/include<br>
LDFLAGS=-L/usr/local/lib64/fftw/intel/lib<br>
CC=/usr/local/intel/bin/icc<br>
CXX=/usr/local/intel/bin/icpc<br>
F77=/usr/local/intel/bin/ifort<br>
CFLAGS=&quot;-O3 -axP -xW &quot;<br>
CXXFLAGS=&quot;-O3 -axP -xW &quot;<br>
FFLAGS=&quot;-O3 -axP -xW &quot;<br>
<br>
configure --without-motif-libraries --without-motif-includes --without-x<br>
**************************************************************************************************<br>
<span style="font-weight: bold;">8 -</span> Substitute the new makefiles in nb_kernels directories for the ones you saved in step 5;<br>
<span style="font-weight: bold;">9 -</span> Make it.<br>
<span style="font-weight: bold;">10 -</span> make install (finally!)<br>
<span style="font-weight: bold;">11 -</span> make distclean (to preserve your disk space)<br>
<br>
I think I haven't forgot anything. ;)<br>
<br>
I can't be sure about this, but I do think that most of the changes
that were necessary to make it run on intel compiler (and, despite I
don't have an intel machine available here, I believe those changes are
necessary for their machines too) can be done with also no harm for the
GCC compilation too. Basically, I'm wasting the &quot;CXX&quot; environment
variable with the &quot;--tag&quot; for libtool, but I thik it can be done in
another fashion without touching it. Also, the substitution of
&quot;invsqrt&quot; for &quot;gmx_invsqrt&quot; is harmless. Possibly the only difficulty
would be to assure that gcc was used for the &quot;mknb&quot; compilation with
intel.<br>
<br>
But, as I said, it compiled. Now I'm playing a bit with the
--enable-doube&quot; and trying to see if it understands &quot;mkl&quot; for blas and
lapack. Will take about an hour. But, working and running is another
problem at this point. I don't think it would really yeld problems
(will know later), but it still yelds me the following warnings:<br>
#######################################################################################################<br>
ghat.c(233): warning #266: function declared implicitly<br>
&nbsp;&nbsp;&nbsp; gh&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = mk_rgrid(ix,iy,iz);<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ^<br>
ghat.c(233): warning #967: conversion from &quot;int&quot; to &quot;real={float} ***&quot;; sizes do not match<br>
&nbsp;&nbsp;&nbsp; gh&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = mk_rgrid(ix,iy,iz);<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ^<br>
fftgrid.c(227): warning #188: enumerated type mixed with another type<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; gmx_fft_3d_real(grid-&gt;fft_setup,dir,grid-&gt;ptr,grid-&gt;workspace);<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
^<br>
gmx_fft_fftw3.c(96): warning #1338: arithmetic on pointer to void or function type<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pv += 8;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ^<br>
gmx_fft_fftw3.c(100): warning #1338: arithmetic on pointer to void or function type<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pv += 8;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ^<br>
gmx_fft_fftw3.c(186): warning #1338: arithmetic on pointer to void or function type<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pv += 8;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ^<br>
gmx_fft_fftw3.c(190): warning #1338: arithmetic on pointer to void or function type<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pv += 8;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ^<br>
gmx_fft_fftw3.c(278): warning #1338: arithmetic on pointer to void or function type<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pv += 8;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ^<br>
gmx_fft_fftw3.c(282): warning #1338: arithmetic on pointer to void or function type<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pv += 8;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ^<br>
gmx_fft_fftw3.c(370): warning #1338: arithmetic on pointer to void or function type<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pv += 8;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ^<br>
gmx_fft_fftw3.c(374): warning #1338: arithmetic on pointer to void or function type<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pv += 8;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ^<br>
gmx_fft_fftw3.c(463): warning #1338: arithmetic on pointer to void or function type<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pv += 8;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ^<br>
gmx_fft_fftw3.c(467): warning #1338: arithmetic on pointer to void or function type<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pv += 8;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ^<br>
gmx_fft_fftw3.c(556): warning #1338: arithmetic on pointer to void or function type<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pv += 8;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ^<br>
gmx_fft_fftw3.c(560): warning #1338: arithmetic on pointer to void or function type<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pv += 8;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ^<br>
gmx_dielectric.c(150): warning #266: function declared implicitly<br>
&nbsp;&nbsp;&nbsp; four1(ptr-1,nnx,-1);<br>
&nbsp;&nbsp;&nbsp; ^<br>
gmx_nmtraj.c(134): warning #592: variable &quot;bDMA&quot; is used before its value is set<br>
&nbsp;&nbsp;&nbsp; read_tps_conf(ftp2fn(efTPS,NFILE,fnm),title,&amp;top,&amp;xtop,NULL,box,bDMA);<br>
########################################################################################<br>
I'm not sure about what they mean. Possibly nothing, But I'll only be
calm if someone says it. Or should I be worried about any of them in
advance already?<br>
<br>
Really thanks a lot to everybody for all help.It almost finished, I
would never have reached this far without all the help. Also, I'll keep
my word and publish a whole tutorial and benchmarks on the list later
on! :)<br>
<br>
Thanks again to everybody,<br>
<br>
Jones<br>