Skip to Content.
Sympa Menu

forum - Re: [abinit-forum] problem of compiling Abinit 5.2.4

forum@abinit.org

Subject: The ABINIT Users Mailing List ( CLOSED )

List archive

Re: [abinit-forum] problem of compiling Abinit 5.2.4


Chronological Thread 
  • From: "Anglade Pierre-Matthieu" <anglade@gmail.com>
  • To: forum@abinit.org
  • Subject: Re: [abinit-forum] problem of compiling Abinit 5.2.4
  • Date: Wed, 24 Jan 2007 13:31:47 +0100
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=YH+X/8DdgweNEfafxCsZ2drPwXEL97GKSe5bj4PJXVSuDJePveHEMcC4RxYza9rmDF0gpteSosJslMP0UOpfLEloYLfVdqyKEd5tswKuThoOvd421Xyoeqc8NKagRpcaXQAn0gHLVNL7TsW9AfvEk9lUqBe1pwTNYCIbSJnu3Lc=

could you try the following:
/home/qzm/bin/pgi/linux86/6.2/bin/pgf90 -O3 -o abinis abinit.F90
../../src/11drive/lib11drive.a ../../src/08seqpar/lib08seqpars.a
../../src/07suscep/lib07suscep.a ../../src/06response/lib06response.a
../../src/06geomoptim/lib06geomoptim.a ../../src/05gw/lib05gw.a
../../src/05common/lib05common.a ../../src/04rsprc/lib04rsprc.a
../../src/04occeig/lib04occeig.a
../../src/04iowfdenpot/lib04iowfdenpot.a
../../src/04rsprc/lib04rsprc.a ../../src/04wfs/lib04wfs.a
../../src/03ionetcdf/lib03ionetcdf.a ../../src/03iovars/lib03iovars.a
../../src/03paw/lib03paw.a ../../src/03recipspace/lib03recipspace.a
../../src/03xc/lib03xc.a ../../src/03xml/lib03xml.a
../../src/03nonlocal/lib03nonlocal.a
../../src/02poisson/lib02poisson.a
../../src/02nlstrain/lib02nlstrain.a ../..! /src/02ffts/lib02ffts.a
../../src/02psp/lib02psp.a ../../src/02poisson/lib02poisson.a
../../src/02geometry/lib02geometry.a ../../src/02parser/lib02parser.a
../../src/02spacepar/lib02spacepars.a
../../src/lib01fftnew/liblib01fftnews.a
../../src/01contract/lib01contract.a
../../src/01managempi/lib01managempis.a ../../src/01util/lib01util.a
../../src/01cg/lib01cg.a ../../src/00basis/lib00basis.a
../../src/defs/libdefs.a -L../../lib/numeric -lnumeric
-L../../lib/numericf90 -lnumericf90 -L../../lib/linalg -llinalg
-L/home/qzm/bin/pgi/linux86/6.2/lib -L/usr/lib
-L/usr/lib/gcc-lib/i386-redhat-linux/3.3.3/ -lpgf90 -lpgf90_rpm1
-lpgf902 -lpgf90rtl -lpgftnrtl -lpgsse1 -lpgsse2 -lnspgc -lpgc -lm

On 1/24/07, zmq.lyao <zmq.lyao@gmail.com> wrote:
I don't know why Abinit use pgcc as linker.
If I try the same command with pgf90 instead of pgcc as you suggested
Following erroer shows:
---------------------------------
/home/qzm/bin/pgi/linux86/6.2/bin/pgf90 -O3 -o abinis
../../src/11drive/lib11drive.a
../../src/08seqpar/lib08seqpars.a
../../src/07suscep/lib07suscep.a
../../src/06response/lib06response.a
../../src/06geomoptim/lib06geomoptim.a
../../src/05gw/lib05gw.a ../../src/05common/lib05common.a
../../src/04rsprc/lib04rsprc.a
../../src/04occeig/lib04occeig.a
../../src/04iowfdenpot/lib04iowfdenpot.a
../../src/04rsprc/lib04rsprc.a ../../src/04wfs/lib04wfs.a
../../src/03ionetcdf/lib03ionetcdf.a
../../src/03iovars/lib03iovars.a ../../src/03paw/lib03paw.a
../../src/03recipspace/lib03recipspace.a
../../src/03xc/lib03xc.a ../../src/03xml/lib03xml.a
../../src/03nonlocal/lib03nonlocal.a
../../src/02poisson/lib02poisson.a
../../src/02nlstrain/lib02nlstrain.a ../..!
/src/02ffts/lib02ffts.a ../../src/02psp/lib02psp.a
../../src/02poisson/lib02poisson.a
../../src/02geometry/lib02geometry.a
../../src/02parser/lib02parser.a
../../src/02spacepar/lib02spacepars.a
../../src/lib01fftnew/liblib01fftnews.a
../../src/01contract/lib01contract.a
../../src/01managempi/lib01managempis.a
../../src/01util/lib01util.a ../../src/01cg/lib01cg.a
../../src/00basis/lib00basis.a ../../src/defs/libdefs.a -L../../lib/numeric
-lnumeric -L../../lib/numericf90 -lnumericf90 -L../../lib/linalg -llinalg
-L/home/qzm/bin/pgi/linux86/6.2/lib -L/usr/lib
-L/usr/lib/gcc-lib/i386-redhat-linux/3.3.3/ -lpgf90
-lpgf90_rpm1 -lpgf902 -lpgf90rtl -lpgftnrtl -lpgsse1 -lpgsse2 -lnspgc -lpgc
-lm

/home/qzm/bin/pgi/linux86/6.2/lib/f90main.o(.text+0x77): In
function `main':
: undefined reference to `MAIN_'
----------------------------------------------------------------------------




On 1/24/07, Anglade Pierre-Matthieu <anglade@gmail.com> wrote:
> It looks like you are using pgcc as a linker. It may be a good idea to
> use pgf90 instead because c program do not need generical main
> function (they MUST include one) unlike fortran program.
>
> Have you tryed the same command with pgf90 instead of pgcc ?
> /home/qzm/bin/pgi/linux86/6.2/bin/pgf90 -O3 -o abinis
> ../../src/11drive/lib11drive.a
../../src/08seqpar/lib08seqpars.a
> ../../src/07suscep/lib07suscep.a
../../src/06response/lib06response.a
> ../../src/06geomoptim/lib06geomoptim.a
../../src/05gw/lib05gw.a
> ../../src/05common/lib05common.a
../../src/04rsprc/lib04rsprc.a
> ../../src/04occeig/lib04occeig.a
> ../../src/04iowfdenpot/lib04iowfdenpot.a
> ../../src/04rsprc/lib04rsprc.a ../../src/04wfs/lib04wfs.a
> ../../src/03ionetcdf/lib03ionetcdf.a
../../src/03iovars/lib03iovars.a
> ../../src/03paw/lib03paw.a
../../src/03recipspace/lib03recipspace.a
> ../../src/03xc/lib03xc.a ../../src/03xml/lib03xml.a
> ../../src/03nonlocal/lib03nonlocal.a
> ../../src/02poisson/lib02poisson.a
> ../../src/02nlstrain/lib02nlstrain.a
../../src/02ffts/lib02ffts.a
> ../../src/02psp/lib02psp.a
../../src/02poisson/lib02poisson.a
> ../../src/02geometry/lib02geometry.a
../../src/02parser/lib02parser.a
> ../../src/02spacepar/l! ib02spacepars.a
> ../../src/lib01fftnew/liblib01fftnews.a
> ../../src/01contract/lib01contract.a
> ../../src/01managempi/lib01managempis.a
../../src/01util/lib01util.a
> ../../src/01cg/lib01cg.a ../../src/00basis/lib00basis.a
> ../../src/defs/libdefs.a -L../../lib/numeric -lnumeric
> -L../../lib/numericf90 -lnumericf90 -L../../lib/linalg -llinalg
> -L/home/qzm/bin/pgi/linux86/6.2/lib -L/usr/lib
> -L/usr/lib/gcc-lib/i386-redhat-linux/3.3.3/ -lpgf90
-lpgf90_rpm1
> -lpgf902 -lpgf90rtl -lpgftnrtl -lpgsse1 -lpgsse2 -lnspgc -lpgc -lm
>
> On 1/24/07, QY ZML <zmq.lyao@gmail.com > wrote:
> >
> >
> > Thanks for your reply.
> >
> > > 1) Which compiler are you using ?
> >
> >
> > My compiler is PGI6.2
> >
> > > 2) can you try the following
> > > rm src/main/*.o `find src -name '*.a'`
> > > make
> >
> >
> > I have try it
> > no .o file in the src/main
> > "find src -name '*.a'" list many .a files.
> > however the make command shows the following error:
> > ...
> > Making all in main
> > make[3]: Entering directory `/home/qzm/abinit-src/abinit-
5.2.4/src/main'
> > /home/qzm/bin/pgi/linux86/6.2/bin/pgcc -O3 -o
abinis
> > ../../src/11drive/lib11drive.a
> > ../../src/08seqpar/lib08seqpars.a
> > ../../src/07suscep/lib07suscep.a
> > ../../src/06response/lib06response.a
> > ../../src/06geomoptim/lib06geomoptim.a
> > ../../src/05gw/lib05gw.a
../../src/05common/lib05common.a
> > ../../src/04rsprc/lib04rsprc.a
> > ../../src/04occeig/lib04occeig.a
> > ../../src/04iowfdenpot/lib04iowfdenpot.a
> > ../../src/04rsprc/lib04rsprc.a ../../src/04wfs/lib04wfs.a
> > ../../src/03ionetcdf/lib03ionetcdf.a
> > ../../src/03iovars/lib03iovars.a
../../src/03paw/lib03paw.a
> > ../../src/03recipspace/lib03recipspace.a
> > ../../src/03xc/lib03xc.a ../../src/03xml/lib03xml.a
> > ../../src/03nonlocal/lib03nonlocal.a
> > ../../src/02poisson/lib02poisson.a
> > ../../src/02nlstrain/lib02nlstrain.a
> > ../../src/02ffts/lib02ffts.a ../../src/02psp/lib02psp.a
> > ../../src/02poisson/lib02poisson.a
> > ../../src/02geometry/lib02geometry.a
> > ../../src/02parser/lib02parser.a
../../src/02spacepar/l!
> > ib02spacepars.a ../../src/lib01fftnew/liblib01fftnews.a
> > ../../src/01contract/lib01contract.a
> > ../../src/01managempi/lib01managempis.a
> > ../../src/01util/lib01util.a ../../src/01cg/lib01cg.a
> > ../../src/00basis/lib00basis.a ../../src/defs/libdefs.a
-L../../lib/numeric
> > -lnumeric -L../../lib/numericf90 -lnumericf90 -L../../lib/linalg
-llinalg
> > -L/home/qzm/bin/pgi/linux86/6.2/lib -L/usr/lib
> > -L/usr/lib/gcc-lib/i386-redhat-linux/3.3.3/ -lpgf90
> > -lpgf90_rpm1 -lpgf902 -lpgf90rtl -lpgftnrtl -lpgsse1 -lpgsse2 -lnspgc
-lpgc
> > -lm
> > /usr/lib/crt1.o(.text+0x18): In function `_start':
> > : undefined reference to `main'
> > make[3]: *** [abinis] ′error 2
> > make[3]: Leaving directory `/home/qzm/abinit-src/abinit-5.2.4/src/main'
> > make[2]: *** [all-recursive] ′error 1
> > make[2]: Leaving directory `/home/qzm/abinit-src/abinit- 5.2.4/src'
> > make[1]: *** [all-recursive] ′error 1
> > make[1]: Leaving directory `/home/qzm/abinit-src/abinit-5.2.4'
> > ----------------------------------
> >
> > The .ac file is as following:
> >
> > #
> > # Generic config file for ABINIT (documented template)
> > #
> > # After editing this file to suit your needs, you may save it as
> > # "~/.abinit/build/<hostname>.ac" to save these parameters as per-user
> > # defaults. Just replace "<hostname>" by the name of your machine,
> > # excluding the domain name.
> > #
> > # Example: if your machine is called "myhost.mydomain", you will save
> > # this file as "~/.abinit/build/myhost.ac".
> > #
> > # You may put this file at the top level of an ABINIT source tree as
well,
> > # in which case its definitions will apply to this particular tree only.
> > #
> > # Hint: If you do not know the name of your machine, just type
"hostname".
> > #
> >
> > #
> > # IMPORTANT NOTES
> > #
> > # 1. It may happen that this file is outdated. In such a case, the best
is
> > # to refer to the command-line options of the "configure" script.
> > #
> > # To have a complete list of these options, just type "./configure
> > --help"
> > # from the top source directory of ABINIT.
> > #
> > # 2. Setting CPPFLAGS, CFLAGS, CXXFLAGS, or FCFLAGS manually is not
> > # recommended and will override any other mechanism involved in
> > # their configuration. Use at your own risks.
> > #
> > # A more gentle way to do is to use the "--with-*-optflags"
command-line
> > # options of the "configure" script. See below for details.
> > #
> > # 3. Do not forget to remove the leading "#" on a line when you
customize
> > # an option.
> > #
> >
> > #
> >
----------------------------------------------------------------------------
> > #
> > # Installation
> > #
> > #
> >
----------------------------------------------------------------------------
> > #
> >
> > # Select which type of installation will be performed by "make install"
> > # (default is prefix)
> > #
> > # Available methods:
> > #
> > # * prefix: use specified prefix
> > # * debian: use Debian/Ubuntu rules
> > # * rpm : use Redhat/Fedora/Mandriva rules
> > #
> > # Note: the default is fine for most installations
> > #
> > with_install_type="prefix"
> >
> > # Where to install ABINIT (default is /opt/etsf for the "prefix" method)
> > #
> > prefix="${HOME}/abinit/"
> >
> > #
> >
----------------------------------------------------------------------------
> > #
> > # Global build options
> > #
> > #
> >
----------------------------------------------------------------------------
> > #
> >
> > # Enable 64-bit compiler flags (default is no)
> > # Note: you might obtain the same result by setting the *FLAGS_64BITS
> > # variables manually.
> > #
> > #enable_64bit_flags="yes"
> >
> > # Enable debug mode (default is no)
> > #
> > #enable_debug="yes"
> >
> > # Allow the use of external libraries (default is yes)
> > # Disable this to force the use of internal versions
> > #
> > #enable_extlibs="no"
> >
> > # Enable advanced configuration features (default is yes)
> > #
> > # Notes:
> > #
> > # * known to make the configure script crash in some (rare) cases
> > # * required for NQXC library support
> > #
> > #enable_smart_config="no"
> >
> > # Enable compiler tricks (default is yes)
> > #
> > #enable_tricks="no"
> >
> > #
> >
----------------------------------------------------------------------------
> > #
> > # Preprocessing
> > #
> > #
> >
----------------------------------------------------------------------------
> > #
> >
> > # C preprocessor (should not be set in most cases)
> > #
> > #CPP="/usr/bin/cpp"
> >
> > # Set preprocessing options (overrides auto-detection)
> > # Use with care!
> > #
> > #with_cppflags="-DFOO"
> >
> > #
> >
----------------------------------------------------------------------------
> > #
> > # C support
> > #
> > #
> >
----------------------------------------------------------------------------
> > #
> >
> > # C compiler
> > #
> > #CC="gcc"
> > #CC="/opt/intel_cc_80/bin/icc"
> > CC="/home/qzm/bin/pgi/linux86/6.2/bin/pgcc"
> > # Set optimizations for C source files (overrides auto-detection)
> > #
> > #with_cc_optflags="-O3"
> > # Add link flags for C binaries (default is unset)
> > #
> > #with_cc_ldflags=""
> >
> > #
> >
----------------------------------------------------------------------------
> > #
> > # C++ support
> > #
> > #
> >
----------------------------------------------------------------------------
> > #
> >
> > # C++ compiler
> > #
> > CXX="g++"
> >
> > # Set optimizations for C++ source files (overrides auto-detection)
> > #
> > #with_cxx_optflags="-O3"
> >
> > # Add link flags for C++ binaries (default is unset)
> > #
> > with_cxx_ldflags=""
> >
> > #
> >
----------------------------------------------------------------------------
> > #
> > # Fortran support
> > #
> > #
> >
----------------------------------------------------------------------------
> > #
> >
> > # Fortran compiler
> > #
> > #FC="/home/qzm/intel/fc/9/bin/ifort"
> > FC="/home/qzm/bin/pgi/linux86/6.2/bin/pgf90"
> >
> > # Set optimizations for Fortran source files (overrides auto-detection)
> > #
> > with_fc_optflags="-O2 -Bstatic"
> >
> > # Add link flags for Fortran binaries (default is unset)
> > #
> > with_fc_ldflags="-L/home/qzm/bin/pgi/linux86/6.2/lib
> > -llapack -lblas"
> >
> > # Choose whether to read file lists from standard input or "ab.files"
> > # (default is yes = standard input)
> > #
> > #enable_stdin="no"
> >
> > # Wrap Fortran compiler calls (default is auto-detected)
> > # Combine this option with enable_debug="yes" to keep preprocessed
source
> > # files (they are removed by default, except if their build fails)
> > #
> > #enable_fc_wrapper="yes"
> >
> > # Set per-directory Fortran optimizations (useful when a Fortran
compiler
> > # crashes during the build)
> > # Note: this option is not available through the command line
> > #
> > #fcflags_opt_11drive="-O0"
> >
> > #
> >
----------------------------------------------------------------------------
> > #
> > # MPI support
> > #
> > #
> >
----------------------------------------------------------------------------
> > #
> >
> > # Determine whether to build parallel code (default is unset)
> > # * enable_mpi unset : let the "configure" script decide
> > # * enable_mpi=yes : force build of parallel code
> > # * enable_mpi=no : disable MPI support
> > #
> > enable_mpi="yes"
> >
> > # Look for the MPI library in <prefix>/lib (default is unset)
> > # This is required for MPI support if your Fortran compiler has no
native
> > # MPI support
> > #
> > with_mpi_prefix="/home/qzm/bin/mpich2/"
> >
> > #
> > # If your MPI installation is not detected, you may set the following
> > # variables manually (please make sure that "enable_mpi" is set to
"yes")
> > #
> >
> > # Set MPI C preprocessor (default is unset)
> > #
> > #with_mpi_fc="/usr/local/bin/mpicpp"
> >
> > # Set MPI-specific preprocessing flags (default is unset)
> > #
> > #with_mpi_cppflags=""
> >
> > # Set MPI C compiler (default is unset)
> > #
> > with_mpi_cc="/home/qzm/bin/mpich2/bin/mpicc"
> >
> > # Set MPI-specific C compile flags (default is unset)
> > #
> > #with_mpi_cflags=""
> >
> > # Set MPI-specific C link flags (default is unset)
> > #
> > #with_mpi_cc_ldflags="-lmpi"
> >
> > # Set MPI C++ compiler (default is unset)
> > #
> > with_mpi_cxx="/home/qzm/bin/mpich2/bin/mpicxx"
> >
> > # Set MPI-specific C++ compile flags (default is unset)
> > #
> > #with_mpi_cxxflags=""
> >
> > # Set MPI-specific C++ link flags (default is unset)
> > #
> > #with_mpi_cxx_ldflags="-lmpi++"
> >
> > # Set MPI Fortran 90 compiler (default is unset)
> > #
> > with_mpi_fc="/home/qzm/bin/mpich2/bin/mpif90"
> >
> > # Set MPI-specific Fortran compile flags (default is unset)
> > #
> > with_mpi_fcflags="-I /home/qzm/bin/mpich2/include"
> >
> > # Set MPI-specific Fortran link flags (default is unset)
> > #
> > #with_mpi_fc_ldflags="-lmpif90"
> >
> > # Set MPI Runner for tests (default is unset)
> > #
> > #with_mpi_run="/home/qzm/bin/mpich2/bin/mpirun"
> >
> > # Activate MPI time tracing (default is no)
> > #
> > #enable_mpi_trace="yes"
> >
> > #
> >
----------------------------------------------------------------------------
> > #
> > # External libraries
> > #
> > #
> >
----------------------------------------------------------------------------
> > #
> >
> > # Enable FFTW library support (default is no)
> > #
> > #enable_fftw="no"
> >
> > # Enable threaded FFTW library support (default is no)
> > # Note: will be ignored if "enable_fftw" is set to "no"
> > #
> > #enable_fftw_threads="no"
> >
> > # Enable BLAS and LAPACK linear algebra libraries support (default is
yes)
> > # Note: disabling them might break the build
> > #
> > #enable_linalg="no"
> >
> > # Link flags for BLAS and LAPACK linear algebra libraries (default is
unset)
> > #
> > #with_linalg_ldflags=""
> >
> > # Type of linear algebra libraries to use (default is unset)
> > # Under development - USE AT YOUR OWN RISKS!
> > #
> > # Supported libraries:
> > #
> > # * acml (not implemented)
> > # * asl (not implemented)
> > # * atlas (untested)
> > # * cxml (not implemented)
> > # * essl (should work)
> > # * mkl (not implemented)
> > # * mlib (not implemented)
> > # * sgimath (not implemented)
> > # * sunperf (not implemented)
> > #
> > #with_linalg_type="mkl"
> > # Enable NetCDF support (default is no)
> > #
> > #enable_netcdf="yes"
> >
> > # Include path for the NetCDF library (default is unset)
> > #
> > #with_netcdf_include="-I/usr/local/include/netcdf"
> >
> > # Link flags for the NetCDF library (default is unset)
> > #
> > #with_netcdf_ldflags="/usr/local/lib/netcdf"
> >
> > # Enable Nanoquanta XC library support (default is no)
> > # Will be forced to "no" if smart config is disabled (see the
> > # "build environment" section above)
> > #
> > #enable_nqxc="yes"
> >
> > # Include path for the Nanoquanta XC library (default is unset)
> > #
> > #with_nqxc_include="-I${HOME}/include/nqxc"
> >
> > # Link flags for the Nanoquanta XC library (default is unset)
> > #
> > #with_nqxc_ldflags="-L${HOME}/lib/nqxc -lnqxc"
> >
> > # Enable XMLF90 library support (default is no)
> > #
> > #enable_xmlf90="yes"
> >
> > # Include path for the XMLF90 library (default is unset)
> > #
> > #with_xmlf90_include="-I${HOME}/include/xmlf90"
> >
> > # Link flags for the XMLF90 library (default is unset)
> > #
> > #with_xmlf90_ldflags="-L${HOME}/lib/xmlf90 -lxmlf90"
> >
> > #
> >
----------------------------------------------------------------------------
> > #
> > # Maintainer options
> > #
> > #
> >
----------------------------------------------------------------------------
> > #
> >
> > # Enable dependency tracking (Automake feature)
> > # Though the exact outcome of this is not known at present, you may
> > # turn it on if you have a taste for adventure ;-)
> > #
> > #enable_dependency_tracking="yes"
>
>
> --
> Pierre-Matthieu Anglade
>




--
Pierre-Matthieu Anglade



Archive powered by MHonArc 2.6.16.

Top of Page