[Pw_forum] problem with compilation
sprokuda at dnk.ru
sprokuda at dnk.ru
Mon Sep 1 08:20:49 CEST 2003
Dear Bachir!
What version did you download ? if fftw 3.something - bad idea, use
FFTW 2.1.5.
I had just the same problem with a couple of weeks ago.
As for the rest - ( undercores and manner of compiler to call the
function) - see the manual. and a bit more ( the replies were given to
me on the same problem) :
1)
FFTW is written in C but fortran wrappers are also included.
Have you succesfully compiled the FFTW package on your machine?
What is the result of " nm /usr/local/lib/libfftw.a | grep f77 "?
(replace /usr/local/lib/ with the name of the directory where you
installed the libfftw.a library)
Different f77 compilers use different name convenctions in order to
call routines (lowercase,uppercase, add_one_underscore,
add_two_underscores...), the "configure" step of fftw figures out what
is your f77 compiler
and use g77 if nothing else applies.
If you have a fortran compiler which is not in the list checked by
the configure script, after the configure step but before actually
compiling the library (with the make command), you may need to edit the
fftw/config.h file, look for the string
/*********************** fortran wrapper configuration
*********************/
and set the values appropriated for you fortran compiler.
In any case if you succesfully compiled the package, no matter which f77
compiler the configure script found,
the "nm /usr/local/lib/libfftw.a | grep f77 " should find something.
Then you only need to discover how your fortran compiler likes to call
routines (for instance by "nm pwscf.o"), set the fftw/config.h
parameters accordingly and repeat the installation
2)
First you have to download FFTW-sources
(v.2.1.3) from www.fftw.org or www.netlib.org. Please
be careful do not download the 3.0 version. It is not
incompatible for the code.
Then unpack it and go to the directory
/your_FFTW_dir/fftw and edit the config.h file. At the
end of the file please find lines which look the next
ones (as should be). A line should be commented out.
/* #undef FFTW_FORTRANIZE_LOWERCASE */
#define FFTW_FORTRANIZE_LOWERCASE_UNDERSCORE 1
/* #undef FFTW_FORTRANIZE_UPPERCASE */
/* #undef FFTW_FORTRANIZE_UPPERCASE_UNDERSCORE */
Then just press "configure", "make", "make install".
The last, you should link the fftw-bibrary you are
being installed before the MKL one, i.e. -lfftw
-lMKL..
Probably the above mentioned procedure is not required
for the v.1.2 (PWSCF), but you have to check it.
Exactly you do not need the FFTW.3.0 version and you
can remove it.
ALT Linux is RedHat based one, so it should work good.
Your troubles go to FFTW.3.0.
Any question, please let me know.
regards, Sergey.
More information about the users
mailing list