24小时热门版块排行榜    

查看: 641  |  回复: 5
当前主题已经存档。

huangye2001

木虫 (正式写手)

[交流] [求助] 请教abinit 5.4-4的安装方法

各位学长,请问abinit 5.4-4在linux下是如何安装的?在安装前需要先安装那些软件呀?这些预备软件要到那里去下载?最好是把具体的安装过程告诉我,提前谢谢了!祝各位工作愉快

[ Last edited by huangye2001 on 2008-4-16 at 13:41 ]
回复此楼

» 猜你喜欢

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

y1ding

铁杆木虫 (著名写手)

★ ★ ★
suntao1982(金币+3,VIP+0):谢谢,欢迎常来计算模拟版!
2. How to make the executables ?
If you got the binary executable package, you should skip the present section and go to the internal testing section. These executables are presently stored in the ~abinit/opt subdirectory.

We now suppose that you have a F90 compiler and you want to compile the source files.

In most cases, you will have to provide to the 'make' utility some information: the location of the F90 compiler (and sometimes even the C compiler) on your machine, the adequate compiler options, and, if you want to produce the parallel binaries, the location of the MPI library on your machine.
Although the presently implemented building tools should be powerful enough to succeed to make the binaries without you giving such information, it has been seen that on a significant number of platforms, it was better still to give them.

Supposing that you are in the lucky case where the build system is able to find all the information, then the build of ABINITv5 is very simple. Issue :

configure or ./configure (or first create a tmp directory, then cd tmp, then ../configure)
make or ./make (or ./make multi for using several processors on a SMP machine)
(optionally) ./make install
Well, it might also be that only one additional information is needed, in which case something like
configure FC=f95
make
might work. In both cases, let's explain a bit what is done, and the further possibilities.
The 'configure' step produces the set of Makefile files (among other things), taking into account information about your machine and the hostname.ac file. It takes one minute long, or less. The 'make' step compiles everything, according to the Makefile files produced in the prior step. The time to make everything is highly dependent on the compiler and platform. On a 2.8 GHz bi-proc machine (using make multi), the whole compilation is about 4 minutes. On some other platforms, with only one processor, it might be more than one hour.

The executables will be located in the subdirectory ~abinit/src/main, if you have chosen to issue ./configure in the ~abinit directory. If you have issued ./configure in another directory, it will be placed accordingly.

The 'make' command can also be used in many different ways, by mentioning one or more targets. A (partial) list of targets for users can be obtained by typing

make help
Additional targets, for developers, can be obtained by typing
make help_dev
It is possible to compile only one of the executable, just after the configure step by typing


make name_of_the_binary    (where name_of_the_binary can be abinis, abinip, abinitgw, newsp ...)

These are only a tiny fraction of the things that you can realize thanks to 'make'. Moreover, there are also 'Makefile' files in most of the subdirectories of ABINIT, with often their own (partial) list of targets for users (and also sometimes for developers). To obtain these lists, go to the directory, and type
make help
or
make help_dev
Finally,

make install
will install abinit in the /opt/etsf directory (etsf is the abbreviation of European Theoretical Spectroscopy Facility). In the directory ~abinit/doc/config , you will find two important help files, in case you want to go further : build-howto.txt and using-configure.txt .
Let's come back to the case where the build system needs some more information. This information should be stored in a file named hostname.ac , where "hostname" is the result of executing the command "hostname" on your machine, e.g. sleepy.pcpm.ucl.ac.be or dirac ... , and taking the first word of the returned chain of character, e.g. sleepy or dirac ...
There is a template for such a file, located in ~abinit/doc/config . Its name is build-config.ac . Examples of such files, that have been used for testing the package, can be found in ~abinit/doc/config/build-examples . By the way, the known problems observed for these different tests are mentioned in the ~abinit/KNOWN_PROBLEMS file, and the hostname.ac files are correspondingly indicated at the beginning of this file.

The hostname.ac file can be compared to the previously used 'makefile_macros' file (in ABINITv4 and prior). In general, you will notice that much less information is required. The new build system is much more clever than the previous one. The most examples given in the ~abinit/doc/config/build-examples contain about five definitions : F90 and C locations, F90 and C options, MPI library location (or the indication that MPI is not enabled). On the other hand, there are many other possible control flags, needed for advanced use. The activation of additional libraries (NETCDF, NQXC, XMLF90) should cause less problems than in the previous build system.

Your hostname.ac file might be placed in your home directory (this is new compared to the previous build system), in a new directory that you will name ~/.abinit/build . At that location, everytime you install a new version of ABINIT, the needed information will be found by ABINIT, so you do not have to care anymore about this file after the first installation.

On the other hand, if you need to play with several computers, you can place the hostname.ac file directory in the ~abinit directory, where such a hostname.ac file will be also seen by the build system (and preferred over the one located in ~/.abinit/build ) or in your build directory (like ~abinit/tmp). As mentioned above, you might even type at the terminal the definitions contained in the hostname.ac file.

Note the order of precedence for the location of the hostname.ac file (or command-line information), in case more than one possibility is used, (decreasing order of precedence) :

Command line (overcome all other information)
Your build directory (~abinit/tmp)
The ABINIT top directory (~abinit)
~/.abinit/build
/etc/abinit/build
Finally, note that the first generation of a hostname.ac file can be done quite straighforwardly if you can rely on the 'makefile_macros' file that was used previously for your machines (in ABINITv4 or prior). As a first try, simply copy the values for the Fortran 90 compiler, perhaps the options for the libraries, and (eventually) the MPI location. As an example, for the machine sleepy.pcpm.ucl.ac.be, the three following information were given in the makefile_macros file :

FC=/usr/pgi-4.0-2/linux86/bin/pgf90 -Bstatic
FFLAGS_LIBS = -O2
MPI_A=-L/usr/local/mpi-pgi4/lib -lmpichf90 -lpmpich -lmpich -lpmpich
from which the (reformatted) definitions can be set-up, in the hostname.ac file :
FC="/usr/pgi-4.0-2/linux86/bin/pgf90"
with_fortran_optflags="-O2 -Bstatic"
with_mpi_prefix="/usr/local/mpi-pgi4"
All other information from the makefile_macros file are not needed anymore. Compare the file (from version 4.6.5)
~abinit/Machine_dept_files/Intel_P6/makefile_macros.PGI4.0.2static_sleepy
with the new file
~abinit/doc/config/build-examples/i686-pgi4.0_sleepy.ac
As an additional useful trick, note that you might specify e.g. the location of a mpif.h file (e.g. /full_path/mppif.h) using
--with-mpi-fcflags="-I/full_path"

When the hostname.ac file is ready, you have to issue, in the ~abinit directory :

configure or ./configure (or first create a tmp directory, then cd tmp, create a hostname.ac file, then ../configure)
make or ./make (or ./make multi for using several processors on a SMP machine)
(optionally) ./make install
2楼2008-04-16 17:08:36
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

y1ding

铁杆木虫 (著名写手)

3楼2008-04-16 17:08:51
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

huangye2001

木虫 (正式写手)

谢谢您们的帮助!可是由于对linux所知甚少,我不知道该如何安装fortran90且也不知道在那下载到该软件!请求帮助。麻烦学长了。
4楼2008-04-17 09:59:19
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

kanminbad

金虫 (小有名气)

★ ★ ★
lei0736(金币+3,VIP+0):谢谢
我来给你说一下,我安装过5.4.3。

首先我不知道你用的是哪个linux,建议使用ubuntu,有的源里面就有abinit,使用新立得很容易安装,当然了,不是最新的5.4.4版本。

如果不是ubuntu,而是别的linux,那就相对麻烦些。可以先./configure > log
然后查看log文件,看哪些没有安装,然后相应的安装上即可

其实linux操作系统很多,稍有不同。俺也是菜鸟,也不太懂,希望有所帮助。
5楼2008-04-28 21:55:12
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

huangye2001

木虫 (正式写手)

谢谢各位的热心帮助,可是我还是安不上呀?我用的是fodera8,请问可以用汉语告诉我一下安装过程吗?哎,我的英语太差了,我没有弄懂英文的意思。谢谢了
6楼2008-05-19 20:53:31
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
相关版块跳转 我要订阅楼主 huangye2001 的主题更新
普通表情 高级回复 (可上传附件)
信息提示
请填处理意见