About a thousand tricks. I'll publish a tutorial later. But, basically:
1 - Change all invsrt calls to gmx_inv-sqrt (57 entries, 12 files);
2 - Edit the Makefile.in in the nb_kernels directories, changing the line "LTCCASCOMPILE = $(LIBTOOL) --mode=compile $(CCAS) $(AM_CCASFLAGS) \" by "LTCCASCOMPILE = $(LIBTOOL) --mode=compile --tag=CXX $(CCAS) $(AM_CCASFLAGS) \" in "Makefile.in" files;
3 - make disclean (for safety);
4 - Run the configure for "gcc", BUT with the following environment and flags(at least):
*************************************************************************************
CPPFLAGS=-I/usr/local/lib64/fftw/gnu/include
LDFLAGS=-L/usr/local/lib64/fftw/gnu/lib
CC=/usr/bin/gcc
CXX=/usr/local/intel/bin/icpc
F77=/usr/bin/g77
CFLAGS="-O3 -ffast-math -funroll-all-loops -fpeel-loops "
CXXFLAGS="-O3 -axP -xW "
F77FLAGS="-O3 -ffast-math -funroll-all-loops -fpeel-loops "
*************************************************************************************
5 - SAVE the Makefile from nb_kernels directories; special care for the one your compilation will use for sure (machine dependent);
6 - make distcean (for necessity)
7 - Now, run again configure for intel compilers, with the new environment and flags (at least) below:
**************************************************************************************************
PATH="$PATH /usr/local/intel/bin/ . /usr/local/intel/lib/"
LD_LIBRARY_PATH=/usr/local/intel/lib/
CPPFLAGS=-I/usr/local/lib64/fftw/intel/include
LDFLAGS=-L/usr/local/lib64/fftw/intel/lib
CC=/usr/local/intel/bin/icc
CXX=/usr/local/intel/bin/icpc
F77=/usr/local/intel/bin/ifort
CFLAGS="-O3 -axP -xW "
CXXFLAGS="-O3 -axP -xW "
FFLAGS="-O3 -axP -xW "
configure --without-motif-libraries --without-motif-includes --without-x
**************************************************************************************************
8 - Substitute the new makefiles in nb_kernels directories for the ones you saved in step 5;
9 - Make it.
10 - make install (finally!)
11 - make distclean (to preserve your disk space)
I think I haven't forgot anything. ;)
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 "CXX" environment variable with the "--tag" for libtool, but I thik it can be done in another fashion without touching it. Also, the substitution of "invsqrt" for "gmx_invsqrt" is harmless. Possibly the only difficulty would be to assure that gcc was used for the "mknb" compilation with intel.
But, as I said, it compiled. Now I'm playing a bit with the --enable-doube" and trying to see if it understands "mkl" 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:
#######################################################################################################
ghat.c(233): warning #266: function declared implicitly
gh = mk_rgrid(ix,iy,iz);
^
ghat.c(233): warning #967: conversion from "int" to "real={float} ***"; sizes do not match
gh = mk_rgrid(ix,iy,iz);
^
fftgrid.c(227): warning #188: enumerated type mixed with another type
gmx_fft_3d_real(grid->fft_setup,dir,grid->ptr,grid->workspace);
^
gmx_fft_fftw3.c(96): warning #1338: arithmetic on pointer to void or function type
pv += 8;
^
gmx_fft_fftw3.c(100): warning #1338: arithmetic on pointer to void or function type
pv += 8;
^
gmx_fft_fftw3.c(186): warning #1338: arithmetic on pointer to void or function type
pv += 8;
^
gmx_fft_fftw3.c(190): warning #1338: arithmetic on pointer to void or function type
pv += 8;
^
gmx_fft_fftw3.c(278): warning #1338: arithmetic on pointer to void or function type
pv += 8;
^
gmx_fft_fftw3.c(282): warning #1338: arithmetic on pointer to void or function type
pv += 8;
^
gmx_fft_fftw3.c(370): warning #1338: arithmetic on pointer to void or function type
pv += 8;
^
gmx_fft_fftw3.c(374): warning #1338: arithmetic on pointer to void or function type
pv += 8;
^
gmx_fft_fftw3.c(463): warning #1338: arithmetic on pointer to void or function type
pv += 8;
^
gmx_fft_fftw3.c(467): warning #1338: arithmetic on pointer to void or function type
pv += 8;
^
gmx_fft_fftw3.c(556): warning #1338: arithmetic on pointer to void or function type
pv += 8;
^
gmx_fft_fftw3.c(560): warning #1338: arithmetic on pointer to void or function type
pv += 8;
^
gmx_dielectric.c(150): warning #266: function declared implicitly
four1(ptr-1,nnx,-1);
^
gmx_nmtraj.c(134): warning #592: variable "bDMA" is used before its value is set
read_tps_conf(ftp2fn(efTPS,NFILE,fnm),title,&top,&xtop,NULL,box,bDMA);
########################################################################################
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?
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! :)
Thanks again to everybody,
Jones
_______________________________________________ gmx-users mailing list gmx-users@gromacs.org http://www.gromacs.org/mailman/listinfo/gmx-users Please don't post (un)subscribe requests to the list. Use the www interface or send it to [EMAIL PROTECTED] Can't post? Read http://www.gromacs.org/mailing_lists/users.php