Chinaunix首页 | 论坛 | 博客
  • 博客访问: 620722
  • 博文数量: 43
  • 博客积分: 4250
  • 博客等级: 上校
  • 技术积分: 486
  • 用 户 组: 普通用户
  • 注册时间: 2006-05-04 04:09
文章分类
文章存档

2009年(2)

2008年(5)

2007年(29)

2006年(7)

我的朋友

分类: LINUX

2008-03-10 06:55:41

只是一篇随笔.
1.mvapich使用ch_gen2驱动. make.mvapich.gen2的修改如下
IBHOME=${IBHOME:-/usr}
IBHOME_LIB=${IBHOME_LIB:-/usr/lib64}
PREFIX=${PREFIX:-/usr/local/mvapich-gfortran}
export CC=${CC:-gcc}
export CXX=${CXX:-g++}
export F77=${F77:-gfortran}
export F90=${F90:-gfortran}
export F77_GETARGDECL=" "

2.MM5下的configure.user的配置

RUNTIME_SYSTEM = "linux"
MPP_TARGET=$(RUNTIME_SYSTEM)
LINUX_MPIHOME = /usr/local/mvapich-gfortran
MFC = $(LINUX_MPIHOME)/bin/mpif90
MCC = $(LINUX_MPIHOME)/bin/mpicc
MLD = $(LINUX_MPIHOME)/bin/mpif90
CC = $(MCC)
FCFLAGS = -O2 -fcray-pointer -fconvert=big-endian -frecord-marker=4 -DDEC_ALPHA
LDOPTIONS = -O2 -fcray-pointer -fconvert=big-endian -frecord-marker=4 -DDEC_ALPHA
LOCAL_LIBRARIES = -L$(LINUX_MPIHOME)/lib -lfmpich -lmpich  
...
CPPFLAGS = -DMPI -Dlinux -DDEC_ALPHA
CFLAGS = -DMPI -I$(LINUX_MPIHOME)/include  -DDEC_ALPHA

3.MPP编译是可能要改的文件.
1)MPP/RSL/RSL/rsl.h中的832行.此处被我注释了,因为重复定义了.
//typedef int MPI_Fint;

2)MPP/RSL/RSL/rsl_mpi_compat.c中第111行.
xargc = iargc_()+1;
改为
xagc = _gfortran_iargc()+1;
 
3)MPP/RSL/RSL/mpir_getarg.F中第74,75行.
integer iargc
external iargc
改为
! integer iargc
! external iargc

4.此时可以正常编译了.
# make mpp
得到mm5.mpp

 
5.运行
#/usr/local/mvapich-gfortran/bin/mpirun_rsh -np 8 -hostfile ./hosts  GFORTRAN_UNBUFFERED_ALL=y ./mm5.mpp &
blade2-test -- rsl_nproc_all 8, rsl_myproc 6
blade2-test -- rsl_nproc_all 8, rsl_myproc 7
blade2-test -- rsl_nproc_all 8, rsl_myproc 2
blade2-test -- rsl_nproc_all 8, rsl_myproc 0
blade2-test -- rsl_nproc_all 8, rsl_myproc 4
blade2-test -- rsl_nproc_all 8, rsl_myproc 3
blade2-test -- rsl_nproc_all 8, rsl_myproc 1
blade2-test -- rsl_nproc_all 8, rsl_myproc 5
 
#ps -ef | grep mm5.mpp
root      2185  7649  0 11:42 pts/0    00:00:00 /usr/local/mvapich-gfortran/bin mpirun_rsh -np 8 -hostfile ./hosts GFORTRAN_UNBUFFERED_ALL=y ./mm5.mpp
root      2186  2185  0 11:42 pts/0    00:00:00 /usr/bin/ssh -q blade2-test cd /home/test/mpptest.wys/Run; /usr/bin/env MPISPAWN_LD_LIBRARY_PATH=/usr/local/mvapich-gfortran/lib/shared MPISPAWN_MPIRUN_MPD=0 MPISPAWN_MPIRUN_HOST=blade2-test MPISPAWN_CHECKIN_PORT=32963 MPISPAWN_MPIRUN_PORT=32963 MPISPAWN_GLOBAL_NPROCS=8 MPISPAWN_MPIRUN_ID=2185 MPISPAWN_ARGC=1 MPISPAWN_ARGV_0=./mm5.mpp MPISPAWN_GENERIC_ENV_COUNT=1  MPISPAWN_GENERIC_NAME_0=GFORTRAN_UNBUFFERED_ALL MPISPAWN_GENERIC_VALUE_0=y MPISPAWN_ID=0 MPISPAWN_LOCAL_NPROCS=8 MPISPAWN_WORKING_DIR=/home/test/mpptest.wys/Run MPISPAWN_MPIRUN_RANK_0=0 MPISPAWN_VIADEV_DEFAULT_PORT_0=-1 MPISPAWN_MPIRUN_RANK_1=1 MPISPAWN_VIADEV_DEFAULT_PORT_1=-1 MPISPAWN_MPIRUN_RANK_2=2 MPISPAWN_VIADEV_DEFAULT_PORT_2=-1 MPISPAWN_MPIRUN_RANK_3=3 MPISPAWN_VIADEV_DEFAULT_PORT_3=-1 MPISPAWN_MPIRUN_RANK_4=4 MPISPAWN_VIADEV_DEFAULT_PORT_4=-1 MPISPAWN_MPIRUN_RANK_5=5 MPISPAWN_VIADEV_DEFAULT_PORT_5=-1 MPISPAWN_MPIRUN_RANK_6=6 MPISPAWN_VIADEV_DEFAULT_PORT_6=-1 MPISPAWN_MPIRUN_RANK_7=7 MPISPAWN_VIADEV_DEFAULT_PORT_7=-1  /usr/local/mvapich-gfortran/bin/mpispawn
root      2191  2187  0 11:42 ?        00:00:00 bash -c cd /home/test/mpptest.wys/Run; /usr/bin/env MPISPAWN_LD_LIBRARY_PATH=/usr/local/mvapich-gfortran/lib/shared MPISPAWN_MPIRUN_MPD=0 MPISPAWN_MPIRUN_HOST=blade2-test MPISPAWN_CHECKIN_PORT=32963 MPISPAWN_MPIRUN_PORT=32963 MPISPAWN_GLOBAL_NPROCS=8 MPISPAWN_MPIRUN_ID=2185 MPISPAWN_ARGC=1 MPISPAWN_ARGV_0=./mm5.mpp MPISPAWN_GENERIC_ENV_COUNT=1  MPISPAWN_GENERIC_NAME_0=GFORTRAN_UNBUFFERED_ALL MPISPAWN_GENERIC_VALUE_0=y MPISPAWN_ID=0 MPISPAWN_LOCAL_NPROCS=8 MPISPAWN_WORKING_DIR=/home/test/mpptest.wys/Run MPISPAWN_MPIRUN_RANK_0=0 MPISPAWN_VIADEV_DEFAULT_PORT_0=-1 MPISPAWN_MPIRUN_RANK_1=1 MPISPAWN_VIADEV_DEFAULT_PORT_1=-1 MPISPAWN_MPIRUN_RANK_2=2 MPISPAWN_VIADEV_DEFAULT_PORT_2=-1 MPISPAWN_MPIRUN_RANK_3=3 MPISPAWN_VIADEV_DEFAULT_PORT_3=-1 MPISPAWN_MPIRUN_RANK_4=4 MPISPAWN_VIADEV_DEFAULT_PORT_4=-1 MPISPAWN_MPIRUN_RANK_5=5 MPISPAWN_VIADEV_DEFAULT_PORT_5=-1 MPISPAWN_MPIRUN_RANK_6=6 MPISPAWN_VIADEV_DEFAULT_PORT_6=-1 MPISPAWN_MPIRUN_RANK_7=7 MPISPAWN_VIADEV_DEFAULT_PORT_7=-1  /usr/local/mvapich-gfortran/bin/mpispawn
root      2220  2219 99 11:42 ?        00:12:52 ./mm5.mpp
root      2221  2219 99 11:42 ?        00:12:53 ./mm5.mpp
root      2222  2219 99 11:42 ?        00:12:53 ./mm5.mpp
root      2223  2219 99 11:42 ?        00:12:53 ./mm5.mpp
root      2224  2219 99 11:42 ?        00:12:53 ./mm5.mpp
root      2225  2219 99 11:42 ?        00:12:53 ./mm5.mpp
root      2226  2219 99 11:42 ?        00:12:53 ./mm5.mpp
root      2227  2219 99 11:42 ?        00:12:53 ./mm5.mpp
root      2273  7649  0 11:55 pts/0    00:00:00 grep mm5.mpp

一切正常,Have a good luck.
阅读(6568) | 评论(2) | 转发(0) |
给主人留下些什么吧!~~

wysilly2008-08-18 10:46:21

出现错误的信息在前面,有某个模块没有编译成功,所以librsl.a库未生成。