24小时热门版块排行榜    

CyRhmU.jpeg
查看: 1262  |  回复: 14
当前主题已经存档。

huangyc

木虫 (正式写手)

[交流] [求助]pwscf编译

先恭喜Pwscf版成立!
我的问题如下:

编译PWSCF时make all出现如下问题(我先前没编译过软件):
test -d bin || mkdir bin
if test -d iotk ; then \
( cd iotk ; if test "make" = "" ; then make  TLDEPS= lib+util ; \
else make  TLDEPS= lib+util ; fi ) ; fi
make[1]: Entering directory `/localhome/huang/espresso-4.0.3/iotk'
cd src ; make lib+util
make[2]: Entering directory `/localhome/huang/espresso-4.0.3/iotk/src'
mpif90 -O2 -assume byterecl -nomodule -fpp -D__INTEL -D__FFTW -D__USE_INTERNAL_FFTW -I../include  -I./  -I../Modules  -I../iotk/src -I../PW  -I../PH -c iotk_base.f90
ERROR: gfortran compiler is not in PATH for driver: mpif90
make[2]: *** [iotk_base.o] Error 1
make[2]: Leaving directory `/localhome/huang/espresso-4.0.3/iotk/src'
make[1]: *** [lib+util] Error 2
make[1]: Leaving directory `/localhome/huang/espresso-4.0.3/iotk'
make: *** [libiotk] Error 2
好象应该是数学库的问题,机器上用的是mkl库,不知怎么连接上,谢谢
回复此楼

» 猜你喜欢

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

y1ding

铁杆木虫 (著名写手)


fegg7502(金币+1,VIP+0):鼓励讨论
gfortran compiler is not in PATH for driver: mpif90
编译器没有装好!
2楼2008-11-21 20:42:07
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

huangyc

木虫 (正式写手)

楼上能否说详细点啊,那编译器应该怎么装啊,我没有经验,谢谢
3楼2008-11-22 18:38:36
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

idoldog

铜虫 (小有名气)

fegg7502(金币+3,VIP+0):以资奖励
fegg7502(金币-3,VIP+0):小木虫是互助交流的地方,讲价格不合适啊,扣了,把详细方法说出来,有重奖
csfn(金币+0,VIP+0):请注意emuch禁止广告,因此如果下次再发广告根据版规处理呢。如果能够贴出正确答案我们非常欢迎,建议你的广告可以放在你的个人签名或者标签里面进行,而不是重复发
我来告诉你好了

配置一下环境变量
例如FC=你的Fortarn编译器名称
另外你的Fortarn编译器的路径需要加到PATH里面

我不建议你使用gfortran,GNU编译器太慢。

请使用export 或者 env 命令完成上述操作。

如果你想节省自己的时间而且想尽量发挥机器的性能,可以从我这购买一张光盘。
之前我发过一个广告贴,

================================================

你可以使用abinit或者pwscf来计算,具体细节可以联系我

我可以以一个合适价格转让给你

希望对你有所帮助

你可以很容易地实现从MS到上述计算的转换

并且一下方面将会得到很好的处理

1.编译器优化。我们有理由相信一款好的编译器可以最好的发挥机器的性能,这一点Intel比GNU做得好。
2.单机并行。对于SMP机器(单机多核),CPU的功效将会被最大限度的发挥出来。
3.集群并行。
4.高效的数学库。

DELL 4核2G内存台式机 6000+RMB 可以在24小时内处理40个原子的超原胞计算。或者你可以部分使用MS的优化结果。

另外,大量软件的用户手册、教程、示例以及简单教学录像被收集并给予提供。天津地区有计算机供应。

发票(10%)提供,请联系QQ:155192560
4楼2008-11-23 16:45:53
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

huangyc

木虫 (正式写手)

呵呵,谢谢idoldog,anyway
5楼2008-11-23 21:15:12
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

idoldog

铜虫 (小有名气)

买张光盘都这么多事! 俺不卖了
6楼2008-11-23 22:19:17
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

老虎大王

木虫 (著名写手)


fegg7502(金币+1,VIP+0):鼓励讨论
ERROR: gfortran compiler is not in PATH for driver: mpif90

你在用make命令之前,是否用过./configure命令啊?你用的是什么机器?
7楼2008-11-24 08:36:22
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

灯塔守望者

铁杆木虫 (正式写手)

★ ★ ★ ★ ★
fegg7502(金币+3,VIP+0):thanks
csfn(金币+2,VIP+0):many thanks, 辛苦了
建议你用intel fortran编译,如果是intel的cpu.数学库函数采用mkl.在终端中运行which mpif90.看是否加载到环境变量中。
./configure FC=ifort CC=icc LIBDIRS=/home/student/intel/mkl/10.0.5.025/lib/em64t

参考我的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
FDFLAGS        = $(DFLAGS)

# IFLAGS = how to locate directories where files to be included are
# In most cases, IFLAGS = -I../include
# If loading an external FFTW library, add the location of FFTW include files

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

# 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         = /home/student/Apps/mpich2-1.0.8-intel/bin/mpif90
#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             = /home/student/Apps/mpich2-1.0.8-intel/bin/mpif90
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/home/student/intel/mkl/10.0.5.025/lib/em64t -lmkl_em64t -lguide -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/home/student/intel/mkl/10.0.5.025/lib/em64t -lmkl_em64t -lguide -lpthread

# nothing needed here if the the internal copy of FFTW is compiled
# (needs -D__FFTW -D__USE_INTERNAL_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       =

# 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
LIBS           = $(LAPACK_LIBS) $(BLAS_LIBS) $(FFT_LIBS) $(MPI_LIBS) $(MASS_LIBS) $(PGPLOT_LIBS) $(LD_LIBS)
8楼2008-11-24 11:49:59
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

huangyc

木虫 (正式写手)

★ ★ ★
fegg7502(金币+3,VIP+0):thanks
6#:make之前用过./configure这个命令
7#:非常感谢 灯塔守望者.我执行./configure后得到make.sys文件,但是并没有得到像您这样的MPIF90         = /home/student/Apps/mpich2-1.0.8-intel/bin/mpif90具体路径(就是MPIF90=mpif90).我把我机器上mpif90及LD等的具体位置加上后,编译依然未通过,错误同上。
菜鸟一个啊,请不吝赐教.

[ Last edited by huangyc on 2008-11-25 at 11:55 ]
9楼2008-11-25 11:25:56
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

灯塔守望者

铁杆木虫 (正式写手)

★ ★ ★
fegg7502(金币+3,VIP+0):thanks
打开make.sys文件,直接修改MPIF90 = /你的mpich安装路径/bin/mpif90.看来不是Mpif90的问题了。pwscf很好编译啊。不行把你的make.sys贴上来让大家看看。
或者仿照我的make.sys修改
10楼2008-11-25 12:47:09
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
相关版块跳转 我要订阅楼主 huangyc 的主题更新
普通表情 高级回复(可上传附件)
信息提示
请填处理意见