24小时热门版块排行榜    

查看: 1178  |  回复: 6
当前主题已经存档。
当前只显示满足指定条件的回帖,点击这里查看本话题的所有回帖

lascqy

银虫 (小有名气)

[交流] 【求助】Pwscf最新版编译问题请教 已有4人参与

编译环境
intel fortran and C compiler
intel mkl
intel mpi
问题如下:
在编译espresso4.0的时候就没有任何问题,./configure时也能识别并行环境
其实很很简单,基本都是默认设置,就更改了BLAS和LAPACK~~
第一步采用的命令为
./configure F90=ifort F77=ifort MPIF90=mpiifort CC=icc --enable-shared
但是在编译4.1.2和4.1.3的时候,无论是直接采用./configure还是添加上以上的参数
无论是mpif90+gfortran还是mpiifort+ifort,或者是使用pwscf自带的BLAS和LAPACK,均在编译到Modules下时出现以下错误,个人觉得是新版更新了造成的,但不知如何解决这个问题,请教一下编过这二个版本的高手~~或者能附上您的make.sys也行,谢谢了,在后边我附上自己的make.sys,大家帮忙看看错在那:
../Modules/dspev_drv.o: In function `dspev_module_mp_pdsyevd_drv_':
dspev_drv.f90:(.text+0x5283): undefined reference to `descinit_'
dspev_drv.f90:(.text+0x56c8): undefined reference to `pdsyevd_'
dspev_drv.f90:(.text+0x5f77): undefined reference to `pdsyevd_'
../Modules/mp_global.o: In function `mp_global_mp_init_ortho_group_':
mp_global.f90:(.text+0x795): undefined reference to `blacs_gridmap_'
mp_global.f90:(.text+0x7bb): undefined reference to `blacs_gridinfo_'
mp_global.f90:(.text+0xfc3): undefined reference to `blacs_gridexit_'
../Modules/mp_global.o: In function `mp_global_mp_init_pool_':
mp_global.f90:(.text+0x16f7): undefined reference to `blacs_pinfo_'
mp_global.f90:(.text+0x170d): undefined reference to `blacs_get_'
mp_global.f90:(.text+0x1aec): undefined reference to `blacs_gridmap_'
mp_global.f90:(.text+0x1b08): undefined reference to `blacs_gridinfo_'
mp_global.f90:(.text+0x27cc): undefined reference to `blacs_gridexit_'
../Modules/ptoolkit.o: In function `parallel_toolkit_mp_pdsyevd_drv_':
ptoolkit.f90:(.text+0x8998): undefined reference to `descinit_'
ptoolkit.f90:(.text+0x8ddd): undefined reference to `pdsyevd_'
ptoolkit.f90:(.text+0x968c): undefined reference to `pdsyevd_'
../Modules/ptoolkit.o: In function `parallel_toolkit_mp_pzheevd_drv_':
ptoolkit.f90:(.text+0xa164): undefined reference to `descinit_'
ptoolkit.f90:(.text+0xa4c9): undefined reference to `pzheevd_'
ptoolkit.f90:(.text+0xac4c): undefined reference to `pzheevd_'
../Modules/zhpev_drv.o: In function `zhpev_module_mp_pzheevd_drv_':
zhpev_drv.f90:(.text+0x6eeb): undefined reference to `descinit_'
zhpev_drv.f90:(.text+0x7253): undefined reference to `pzheevd_'
zhpev_drv.f90:(.text+0x79d0): undefined reference to `pzheevd_'
libpw.a(cdiaghg.o): In function `pcdiaghg_':
cdiaghg.f90:(.text+0x18a6): undefined reference to `descinit_'
cdiaghg.f90:(.text+0x18e3): undefined reference to `pzpotrf_'
cdiaghg.f90:(.text+0x19a4): undefined reference to `pztrtri_'
libpw.a(rdiaghg.o): In function `prdiaghg_':
rdiaghg.f90:(.text+0x15e5): undefined reference to `descinit_'
rdiaghg.f90:(.text+0x161a): undefined reference to `pdpotrf_'
rdiaghg.f90:(.text+0x16b7): undefined reference to `pdtrtri_'
make[1]: *** [pw.x] Error 1
make[1]: Leaving directory `/home/pwscf/Desktop/PWscf323/espresso-4.1.2/PW'
make: *** [pw] Error 2

make.sys
# make.sys.  Generated from make.sys.in by configure.

# compilation rules

.SUFFIXES :
.SUFFIXES : .o .c .f .f90

# most fortran compilers can directly preprocess c-like directives: use
#         $(MPIF90) $(F90FLAGS) -c $<
# if explicit preprocessing by the C preprocessor is needed, use:
#         $(CPP) $(CPPFLAGS) $< -o $*.F90
#        $(MPIF90) $(F90FLAGS) -c $*.F90 -o $*.o
# remember the tabulator in the first column !!!

.f90.o:
        $(MPIF90) $(F90FLAGS) -c $<

# .f.o and .c.o: do not modify

.f.o:
        $(F77) $(FFLAGS) -c $<

.c.o:
        $(CC) $(CFLAGS)  -c $<


# DFLAGS  = precompilation options (possible arguments to -D and -U)
#           used by the C compiler and preprocessor
# FDFLAGS = as DFLAGS, for the f90 compiler
# See include/defs.h.README for a list of options and their meaning
# With the exception of IBM xlf, FDFLAGS = $(DFLAGS)
# For IBM xlf, FDFLAGS is the same as DFLAGS with separating commas

DFLAGS         =  -D__INTEL -D__FFTW -D__USE_INTERNAL_FFTW -D__MPI -D__PARA -D__SCALAPACK
FDFLAGS        = $(DFLAGS)

# IFLAGS = how to locate directories where files to be included are
# In most cases, IFLAGS = -I../include

IFLAGS         = -I../include

# MODFLAGS = flag used by f90 compiler to locate modules
# You need to search for modules in ./, in ../iotk/src, in ../Modules
# Some applications also need modules in ../PW and ../PH

MODFLAGS       = -I./  -I../Modules  -I../iotk/src \
                 -I../PW  -I../PH  -I../EE -I../GIPAW

# Compilers: fortran-90, fortran-77, C
# If a parallel compilation is desired, MPIF90 should be a fortran-90
# compiler that produces executables for parallel execution using MPI
# (such as for instance mpif90, mpf90, mpxlf90,...);
# otherwise, an ordinary fortran-90 compiler (f90, g95, xlf90, ifort,...)
# If you have a parallel machine but no suitable candidate for MPIF90,
# try to specify the directory containing "mpif.h" in IFLAGS
# and to specify the location of MPI libraries in MPI_LIBS

MPIF90         = mpiifort
#F90           = ifort
CC             = icc
F77            = ifort

# C preprocessor and preprocessing flags - for explicit preprocessing,
# if needed (see the compilation rules above)
# preprocessing flags must include DFLAGS and IFLAGS

CPP            = cpp
CPPFLAGS       = -P -traditional $(DFLAGS) $(IFLAGS)

# compiler flags: C, F90, F77
# C flags must include DFLAGS and IFLAGS
# F90 flags must include MODFLAGS, IFLAGS, and FDFLAGS with appropriate syntax

CFLAGS         = -O3 $(DFLAGS) $(IFLAGS)
F90FLAGS       = $(FFLAGS) -nomodule -fpp $(FDFLAGS) $(IFLAGS) $(MODFLAGS)
FFLAGS         = -O2 -assume byterecl

# compiler flags without optimization for fortran-77
# the latter is NEEDED to properly compile dlamch.f, used by lapack

FFLAGS_NOOPT   = -O0 -assume byterecl

# Linker, linker-specific flags (if any)
# Typically LD coincides with F90 or MPIF90, LD_LIBS is empty

LD             = mpiifort
LDFLAGS        =
LD_LIBS        =

# External Libraries (if any) : blas, lapack, fft, MPI

# If you have nothing better, use the local copy : ../flib/blas.a

BLAS_LIBS      = -L/opt/intel/mkl/10.2.4.032/lib/em64t -lmkl_intel_lp64  -lmkl_sequential -lmkl_core -lpthread

# The following lapack libraries will be available in flib/ :
# ../flib/lapack.a : contains all needed routines
# ../flib/lapack_atlas.a: only routines not present in the Atlas library
# For IBM machines with essl (-D__ESSL): load essl BEFORE lapack !
# remember that LAPACK_LIBS precedes BLAS_LIBS in loading order

LAPACK_LIBS    = -L/opt/intel/mkl/10.2.4.032/lib/em64t -lmkl_intel_lp64  -lmkl_sequential -lmkl_core -lpthread

# nothing needed here if the the internal copy of FFTW is compiled
# (needs -D__FFTW in DFLAGS)

FFT_LIBS       =

# For parallel execution, the correct path to MPI libraries must
# be specified in MPI_LIBS (except for IBM if you use mpxlf)

MPI_LIBS       = -L/opt/intel/impi/3.2.0.011/lib64 -pthread -lmpi -lmpiif

# IBM-specific: MASS libraries, if available and if -D__MASS is defined in FDFLAGS

MASS_LIBS      =

# pgplot libraries (used by some post-processing tools)

PGPLOT_LIBS    =

# ar command and flags - for most architectures: AR = ar, ARFLAGS = ruv
# ARFLAGS_DYNAMIC is used in iotk to produce a dynamical library,
# for Mac OS-X with PowerPC and xlf compiler. In all other cases
# ARFLAGS_DYNAMIC = $(ARFLAGS)

AR             = ar
ARFLAGS        = ruv
ARFLAGS_DYNAMIC= ruv

# ranlib command. If ranlib is not needed (it isn't in most cases) use
# RANLIB = echo

RANLIB         = ranlib

# all internal and external libraries - do not modify

LIBOBJS        = ../flib/ptools.a ../flib/flib.a ../clib/clib.a ../iotk/src/libiotk.a ../Multigrid/mglib.a
LIBS           = $(LAPACK_LIBS) $(BLAS_LIBS) $(FFT_LIBS) $(MPI_LIBS) $(MASS_LIBS) $(PGPLOT_LIBS) $(LD_LIBS)
回复此楼

» 猜你喜欢

已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

lascqy

银虫 (小有名气)

引用回帖:
Originally posted by tjyl at 2010-04-17 22:30:26:
既然是要编译并行版
那就应该是
./configure F90=mpif90 F77=mpif77  CC=mpiicc --enable-shared
你自己去指定直接用ifort和icc来编译,自然不肯定成功滴。

不是的,这个是指编译器命令,并不是mpi的,mpi的由MPIF90制定,也就是ifort对应mpiifort,mpif90对应gfortran的,如果我不加任何参数, ./configure也是识别成mpif90+gfortran而已。而且会报出已经识别并行环境,此为并行版本的信息,pwscf并行编译主要是-D_MPI -D_PARA这二个参数吧
5楼2010-04-18 00:18:05
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
查看全部 7 个回答

goldenfisher

金虫 (著名写手)

★ ★
小木虫(金币+0.5):给个红包,谢谢回帖交流
gavinliu7390(金币+1):谢谢交流! 2010-04-17 22:30
我觉得可以把 -lmkl_intel_lp64  换成 -lmkl_em64t,这应该是有的哦。还有应该加上-lmkl_lapack
2楼2010-04-17 20:26:37
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

lascqy

银虫 (小有名气)

引用回帖:
Originally posted by goldenfisher at 2010-04-17 20:26:37:
我觉得可以把 -lmkl_intel_lp64  换成 -lmkl_em64t,这应该是有的哦。还有应该加上-lmkl_lapack

-lmkl_intel_lp64这个参数是可以确定的,不仅intel官方给的是这样的,而且在pwscf的user guide中也提到的
在Trouble with MKL and MPI parallelization中提到
The cleanest way of avoiding this mess is to either link with
-lmkl_intel_lp64 -lmkl_sequential -lmkl_core (on 64-bit: x86_64, ia64)
-lmkl_intel -lmkl_sequential -lmkl_core (on 32-bit, i.e. ia32 )
or edit the libmkl ’platform’.a file (I’m using now a file libmkl10.a with:
GROUP (libmkl_intel_lp64.a libmkl_sequential.a libmkl_core.a)
但是我觉得可以加上-lmkl_lapack的
3楼2010-04-17 21:14:42
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

tjyl

金虫 (正式写手)

★ ★ ★
小木虫(金币+0.5):给个红包,谢谢回帖交流
gavinliu7390(金币+2):谢谢交流! 2010-04-17 22:54
既然是要编译并行版
那就应该是
./configure F90=mpif90 F77=mpif77  CC=mpiicc --enable-shared
你自己去指定直接用ifort和icc来编译,自然不肯定成功滴。
4楼2010-04-17 22:30:26
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
普通表情 高级回复 (可上传附件)
信息提示
请填处理意见