Skip to Content.
Sympa Menu

forum - Re: [abinit-forum] Compilation of D. Vanderbild USPP

forum@abinit.org

Subject: The ABINIT Users Mailing List ( CLOSED )

List archive

Re: [abinit-forum] Compilation of D. Vanderbild USPP


Chronological Thread 
  • From: Marc Torrent <marc.torrent@cea.fr>
  • To: forum@abinit.org
  • Subject: Re: [abinit-forum] Compilation of D. Vanderbild USPP
  • Date: Wed, 05 Oct 2005 16:00:28 +0200

You should give us the error messages you got (and also the computer type).
But you can try the enclosed Makefile...


Marc Torrent
CEA-Bruyeres-le-Chatel - France

sestak@kn.vutbr.cz a écrit :
Dear Abinit users,
I was trying generate pseudopotential with D. Vanderbild USPP generator but I
have some problem with it. I followed instructions on the web how to compile
this generator but when compiler is trying use my lapack and blas library
then compilation crashed. I dont know where is mistake but I think that I
have wrong lapack and blas libraries. I am using ifort compiler and these
libraries I downloaded from intel web page as part of MKL package. If someone
know solution of this problem please help me.

Thank for answers
Peter Sestak
#!/bin/sh -f

# -------------------------------------------
# Machine-dependent variables
# User may (un)comment following lines

#====== PC + Linux + IFC8 + MKL =============
F90 = ifort
FREEFLAG = -FR
FIXEDFLAG =
F90FLAGS = -O3 -tpp7
LIBDIR=/opt/intel/mkl80/lib/32
LINKFLAGS = -L/opt/intel/mkl80/lib/32 \
-lmkl_lapack -lmkl_lapack32 -lmkl -lguide -lpthread -Vaxlib
SED = sed

# -----------------------------------------------------
# User does not normally modify below here
# -----------------------------------------------------

# -----------------------------------------------------
# Main targets

default: runatom.x

install:
-@echo "Copying runatom.x in /uspp-xyz/Bin..."
-@if [ ! -d ../Bin ];then mkdir ../Bin;fi
-@cp -f ./runatom.x ../Bin

semiclean:
-@echo "Cleaning object files in /uspp-addons and /uspp2abinit..."
-@rm -f ./uspp2abinit/*.o ./uspp2abinit/*.mod ./uspp2abinit/*.d
-@rm -f ./uspp-addons/*.o ./uspp-addons/*.patched.f

clean: semiclean
-@echo "Cleaning runatom.x in /USpp2Abinit..."
-@rm -f ./*.x

clean_all: clean
-@echo "Cleaning object files in /Source..."
-@rm -f ../Source/*.o ../Source/*.x
-@echo "Cleaning runatom.x in /Bin..."
-@rm -f ../Bin/runatom.x

runatom.x: patch_uspp link_runatom

# -----------------------------------------------------
# Secondary targets

patch_uspp: patch_runatom patch_scgsubs patch_pspcor
-@echo "Patching Source/runatom.f and Source/scgsubs.f..."
-@echo "Creating uspp-addons/pspcor.patched.f..."

compile_uspp:
-@echo "Creating object files in /uspp-xyz/Source..."
-@cd ../Source; ${MAKE} -f ${PWD}/Makefile uspp_objs

compile_addons:
-@echo "Creating object files in /uspp-xyz/USpp2Abinit/uspp-addons..."
-@cd ./uspp-addons; ${MAKE} -f ${PWD}/Makefile addons_objs

compile_toabi:
-@echo "Creating object files in /uspp-xyz/USpp2Abinit/uspp2abinit..."
-@cd ./uspp2abinit; ${MAKE} -f ${PWD}/Makefile toabi_objs

link_runatom: compile_addons compile_uspp compile_toabi
-@echo "Linking object files and creating runatom.x..."
-@${F90} \
-o runatom.x ./uspp-addons/*.o ../Source/*.o ./uspp2abinit/*.o \
${LINKFLAGS}


# -----------------------------------------------------
# Targets for patching uspp code

RUNATOM_LOCATION1="c -- Insert here call to uspp2abinit (1)"
RUNATOM_LOCATION2="c -- Insert here call to uspp2abinit (2)"
RUNATOM_PATCH1_1= " call
toabini1(ifpcor,nang,ncores,ncspvs,nbeta,nqf,idim8,mesh,"
RUNATOM_PATCH1_2= " +
qtryc,iptype,ikeyee,nbl,nnlz,a,b,exfact,rpcor,"
RUNATOM_PATCH1_3= " +
z,zv,r,rab,rc,rcloc,rscore,rsvale,snl,wwnl,title)"
RUNATOM_PATCH2_1= " if (ifpsp.eq.2.and.keyps.eq.3)"
RUNATOM_PATCH2_2= " + call toabini4(mesh,rpcor,rspsco,vloc,flname)"
patch_runatom:
-@${SED}
'/^'${RUNATOM_LOCATION1}'/{x;s/^/'${RUNATOM_PATCH1_3}'/;x;G;}'
<../Source/runatom.f \
| ${SED}
'/^'${RUNATOM_LOCATION1}'/{x;s/^/'${RUNATOM_PATCH1_2}'/;x;G;}' \
| ${SED}
'/^'${RUNATOM_LOCATION1}'/{x;s/^/'${RUNATOM_PATCH1_1}'/;x;G;}' \
| ${SED}
'/^'${RUNATOM_LOCATION2}'/{x;s/^/'${RUNATOM_PATCH2_2}'/;x;G;}' \
| ${SED}
'/^'${RUNATOM_LOCATION2}'/{x;s/^/'${RUNATOM_PATCH2_1}'/;x;G;}'
>./uspp-addons/runatom.patched.f

SCGSUBS_LOCATION1= "c -- Insert here call to uspp2abinit (1)"
SCGSUBS_LOCATION2= "c -- Insert here call to uspp2abinit (2)"
SCGSUBS_PATCH1 = " call toabini2(kkbeta,nbeta,phi,psi,beta)"
SCGSUBS_PATCH2 = " call toabini3(nbeta,uuu)"
patch_scgsubs:
-@${SED} '/^'${SCGSUBS_LOCATION1}'/{x;s/^/'${SCGSUBS_PATCH1}'/;x;G;}'
<../Source/scgsubs.f \
| ${SED} '/^'${SCGSUBS_LOCATION2}'/{x;s/^/'${SCGSUBS_PATCH2}'/;x;G;}'
>./uspp-addons/scgsubs.patched.f

PSPCOR_1= "subroutine pspcor("
PSPCOR_2= "end$$"
PSPCOR_3= "subroutine pspcor2("
PSPCOR_4= "tinit = .true."
patch_pspcor:
-@${SED} -n
'/'${PSPCOR_1}'/,/'${PSPCOR_2}'/{s/'${PSPCOR_1}'/'${PSPCOR_3}'/g;s/'${PSPCOR_4}'//g;p;}'
\
<../Source/pssubs.f >./uspp-addons/pspcor.patched.f

# -----------------------------------------------------
USPP_SRCS= rwsubs.f initsubs.f aesubs.f pbe.f pssubs.f \
numsubs.f relsubs.f bessel.f interpol.f trou.f \
eissubs.f
USPP_OBJS= rwsubs.o initsubs.o aesubs.o pbe.o pssubs.o \
numsubs.o relsubs.o bessel.o interpol.o trou.o \
eissubs.o
uspp_objs: ${USPP_OBJS}
#
ADDONS_SRCS= runatom.patched.f scgsubs.patched.f pspcor.patched.f pawsubs.f
ADDONS_OBJS= runatom.patched.o scgsubs.patched.o pspcor.patched.o pawsubs.o
addons_objs: ${ADDONS_OBJS}
#
TOABI_SRCS= defs_basis.f90 defs_pawps.f90 \
bess.f90 bessp.f90 calc_dens.f90 calc_dij0.f90 \
calc_hatden.f90 calc_kij.f90 calc_ntild.f90 \
calc_occ.f90 calc_qij0.f90 calc_rhoij0.f90 calc_shapef.f90 \
calc_vh.f90 calc_vhnzc.f90 calc_vhtnzc.f90 calc_vxc.f90 \
ctrap.f90 gauleg.f90 initpawps1.f90 initpawps2.f90 \
laplacian.f90 nderiv.f90 opt_proj.f90 ortho_phi.f90 \
readdat.f90 rdusps1.f90 rdusps2.f90 scale_phi.f90 \
transfunc.f90 uspp2abinit.f90 wrpawps.f90
TOABI_OBJS= defs_basis.o defs_pawps.o \
bess.o bessp.o calc_dens.o calc_dij0.o \
calc_hatden.o calc_kij.o calc_ntild.o \
calc_occ.o calc_qij0.o calc_rhoij0.o calc_shapef.o \
calc_vh.o calc_vhnzc.o calc_vhtnzc.o calc_vxc.o \
ctrap.o gauleg.o initpawps1.o initpawps2.o \
laplacian.o nderiv.o opt_proj.o ortho_phi.o \
readdat.o rdusps1.o rdusps2.o scale_phi.o \
transfunc.o uspp2abinit.o wrpawps.o
toabi_objs: ${TOABI_OBJS}

# -----------------------------------------------------
.SUFFIXES: .o .f .f90
.f.o:
${F90} ${FIXEDFLAG} ${F90FLAGS} -c $*.f
.f90.o:
${F90} ${FREEFLAG} ${F90FLAGS} -c $*.f90



Archive powered by MHonArc 2.6.16.

Top of Page