[Pw_forum] intel mac --- compilation

Axel Kohlmeyer akohlmey at cmm.chem.upenn.edu
Sun Nov 26 02:50:12 CET 2006


On Sat, 25 Nov 2006, Francesco Ciucci wrote:

FC> Hi all,

francesco,

FC> I am trying to build QuantumEspresso 3.1.1 on my MacBook (the little  
FC> white one).
FC> 
FC> I have as fortran compilers: g77, f2c and gfortran.

please do not mix and match different fortran compilers. g77 and 
f2c use a very similar, but not identical runtime, gfortran
has its own and different runtime. while with some crazy hacks
one could make the compilation succeed, the result would be
desastrous.

FC> 
FC> I run configure as follows:
FC> 
FC> ./configure F77=g77 MPIF90=gfortran CC=gcc F90=gfortran BLAS_LIBS="- 
FC> framework accelerate" LAPACK_LIBS=" " CFLAGS=-O3
FC> 
FC> and I get at the end "configure: success".
FC> 
FC> Although, when I run "sudo make all" I get what I reported in PS  
FC> (sorry it's lengthy).

there is _no_ need to compile with root priviledge (in fact, i strongly
advise against doing _anything_ as root that can be done without, which
is more than what most people would expect). this way you can easily
ruin your whole installation! no regular application program should
need this, especially for compilation.

i just tried the latest cvs version with the gfortran shipped with
fedora core 6 linux and it fails on Modules/input_parameters.f90
due to an internal compiler error, i.e. a bug of the compiler.

FC> 
FC> Could anyone help me out?
FC> 
FC> Thank you,
FC> Fra
FC> 
FC> P.S.
FC> test -d bin || mkdir bin
FC> if test -d iotk ; then \
FC> ( cd iotk ; if test "make" = "" ; then make  TLDEPS= libiotk.a ; \
FC> else make  TLDEPS= libiotk.a ; fi ) ; fi
FC> cd src ; make libiotk.a
FC> cpp -P -traditional -D__FFTW -D__USE_INTERNAL_FFTW -I../include   
FC> iotk_base.f90 -o iotk_base.F90

FC> -------!
FC> 
FC> !----------------------------------------------------------------------- 
FC> -------!
FC> ! Maximum number of errors which can be handled at the same time
FC> integer, parameter :: iotk_error_pool_size   = 100
FC> !----------------------------------------------------------------------- 
FC> -------!

this is because you seem to have a (modified) cpp on your 
machine, that does not support the '-o' flag. for this
you can change the .f90 compilation rule as follows 

.f90.o:
        $(CPP) $(CPPFLAGS) $< -o $*.F90
        $(MPIF90) $(F90FLAGS) -c $*.F90 -o $*.o

please note, that the makefile syntax demands a 'Tab'
and not spaces in front of $(CPP) and $(MPIF90).



cheers,
   axel.

--
=======================================================================
Axel Kohlmeyer   akohlmey at cmm.chem.upenn.edu   http://www.cmm.upenn.edu
   Center for Molecular Modeling   --   University of Pennsylvania
Department of Chemistry, 231 S.34th Street, Philadelphia, PA 19104-6323
tel: 1-215-898-1582,  fax: 1-215-573-6233,  office-tel: 1-215-898-5425
=======================================================================
If you make something idiot-proof, the universe creates a better idiot.




More information about the users mailing list