Skip to Content.
Sympa Menu

forum - [abinit-forum] Re: Dear Alain,sorry to bother you again about DP

forum@abinit.org

Subject: The ABINIT Users Mailing List ( CLOSED )

List archive

[abinit-forum] Re: Dear Alain,sorry to bother you again about DP


Chronological Thread 
  • From: Alain Jacques <ajs.jacques@gmail.com>
  • To: 文沈 <wshen02@gmail.com>, forum@abinit.org
  • Subject: [abinit-forum] Re: Dear Alain,sorry to bother you again about DP
  • Date: Wed, 06 May 2009 11:40:50 +0200
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; b=U16NFBmWitdFDI7/1BS7XAxm6A4vA0aOr+KMQYFk2Wng9eBDOZZt1DwB8Oo3ebHFEF UkHbjBwJ2+j1YGnVTgoRSysOTpbtqYmm8KYksi2DX76n+Gi99+huUKpfU8DToAvBOOmy kSVfFUE6H+Ld1IVqyHkwUfw8rPz2zliTG6GO0=

Hello Wen,

Glad you managed to install DP ...

文沈 wrote:
> Dear Alain,
> Thanks a lot for your last help!!
> Can I ask which version of DP did you installed?

It was almost a year ago; I combined abinit 5.4.4 with DP 5.1.3

> thanks to your help, I made dp-5.1.3 work.
> Then I find something really bad: dp-5.1.3 only works for
> centrosymmetric system and what I want to calculate is a
> noncentrosymmetric system. So the only choice for me is to install the
> version 4.6.2.

This reminds me of a remark somewhere in the documentation. I am not a
specialist of DP; maybe Valerio has more information about this missing
functionality and future versions of the software.

> And I meet a lot of problem when install it. And I used gfortran as my
> compiler.
> Do you still have your mkfmacro files?

I had a look on version 4.6.2 ... it compiles quite differently from
version 5.
The mkfmacro file will be very system dependent ... it will be related
to local fftw, netcdf, blas, lapack libraries.
I checked on one of my development system ... here it goes. It a plain
RedHat Enterprise 5 with netcdf-3.6.3-1.el5.rf,
netcdf-devel-3.6.3-1.el5.rf, fftw-3.1.2-6, fftw-devel-3.1.2-6,
blas-3.1.1-3, blas-devel-3.1.1-3, lapack-3.1.1-3 and
lapack-devel-3.1.1-3 rpms installed. The stock gfortran 4.1.2 is
severely outdated so I compiled a recent gfortran - gcc-4.3.2 from
gcc.gnu.org; it lives in /usr/local/gcc-4.3.2 on my system.
After untarring dp-4.6.2, an export PATH=/usr/local/gcc-4.3.2/bin:$PATH
and an export
LD_LIBRARY_PATH=/usr/local/gcc-4.3.2/lib64:$LD_LIBRARY_PATH (in order to
default gcc and gfortran to my homemage toolchain), I have edited the
src/mkfmacro to ...

# linux gfortran compiler
# PLEASE USE gmake
MACHINE = pc
CC = gcc
CFLAGS = -O2 -m64
FC = gfortran
FFLAGS = -O2 -m64 -lnetcdff -lnetcdf
FREEFORM = -ffree-form
LD = $(FC)
LDFLAGS = $(FFLAGS)
INETCDFINC=-I/usr/include
# since the main is in C, you can link using the C compiler and hence
# indicate thank to LFOR indicate to link the Fortran libraries
# or you can link using the Fortran compiler and then indicate that
# the main is in C (-no-fotranmain) and link the C libraries (-lm)
LFOR =
# If you have not installed the NetCDF libraries, set LNETCDF empty
LNETCDF =
LFFTW = -lfftw3
# We compile using LaPack and FFTW libraries
ALL = lapackfftw


A few explanations:
-m64 because I have a 64bit RHEL and 64bit libraries
-lnetcdff -lnetcdf because netcdf rpms install separated C/fortran
libraries i.e. /usr/lib64/libnetcdf.so.4 and /usr/lib64/libnetcdff.so.4
... your system may have a combined lib so only add -lnetcdf
-ffree-form is free form in gfortran jargon
INETCDFINC=-I/usr/include otherwise dp cannot find /usr/include/netcdf.mod
LFFTW = -lfftw3 in order to use fftw-3 /usr/lib64/libfftw3.so.3 library

After copying the /usr/include/fftw3.f to dp src directory in order to
bypass the ifftw.f90 include error, dp make goes up to the end and
produces a bin/dp binary.

Hope it helps.

Kind regards,

Alain


>
> Thanks a lot.
>
>
>
> Wen
>
> Ph.D candidate Georgetown University



  • [abinit-forum] Re: Dear Alain,sorry to bother you again about DP, Alain Jacques, 05/06/2009

Archive powered by MHonArc 2.6.15.

Top of Page