SU的安装.docx

上传人:b****7 文档编号:9259990 上传时间:2023-02-03 格式:DOCX 页数:14 大小:39.39KB
下载 相关 举报
SU的安装.docx_第1页
第1页 / 共14页
SU的安装.docx_第2页
第2页 / 共14页
SU的安装.docx_第3页
第3页 / 共14页
SU的安装.docx_第4页
第4页 / 共14页
SU的安装.docx_第5页
第5页 / 共14页
点击查看更多>>
下载资源
资源描述

SU的安装.docx

《SU的安装.docx》由会员分享,可在线阅读,更多相关《SU的安装.docx(14页珍藏版)》请在冰豆网上搜索。

SU的安装.docx

SU的安装

安装说明

SU是科罗拉多州矿业学院开发的一个免费地震处理软件。

国内外很多科研人员及学生都借助于他来进行创作,和其他天价的处理软件相比,SU对学生就显得尤为珍贵了,更何况他开放源代码,可以方便地在其基础上进行再创作。

   但是对于不是很熟悉LINUX的人来说,能把它安装上也需要花不少功夫,下面就把我的体会写出来,以供大家参考。

   在Redhat9.0,Ubantu,Fedaro5,Fedaro7,和SUN工作站上多次安装,要领如下(默认bsh):

    1、确保不是在root用户下安装,root权限太大,稍有不慎,可能会把系统搞崩溃。

去CWP主页http:

//www.cwp.mines.edu/cwpcodes/index.html下载好安装包,目前版本是:

cwp_su_all_40.gz,用tar-xvzfcwp_su_all_40.gz解压出src文件夹,可以先在家目录下创建su文件夹,把src放在su内。

   2、修改环境变量,先在家目录下(终端打开就是,如果不在用cd命令后面不加参数就可以进去,用pwd就可以看路径,比如我的路径是/home/user,)用ls-a查看文件。

找到.bashrc隐藏文件,用vi编辑器打开(vi.bashrc),在末尾出添加:

    exportCWPROOT=/home/user/su

    exportPATH=$PATH:

:

/home/user/su/bin

   然后保存(“先按ESC键,然后按两次大写Z”或者“先按ESC键,然后输入:

wq”)退出,同样执行vi.bash_profile进行修改:

    exportCWPROOT=/home/user/su

    exportPATH=$PATH:

:

/home/user/su/bin  

   保存退出后,然后执行以下命令:

    source.bashrc

     source.bash_profile

    然后检查设置是否正确:

    echo$CWPROOT

    显示为:

/home/user/su则说明无误

    echo$PATH

    末尾处有/home/user/su/bin就万事大吉了,关掉终端,重新打开一个,确保万无一失,如果不正确,则重新设置。

 

     如果你用的是csh就同样在 .cshrc中添加以下两行内容:

    setenvCWPROOT/home/user/su

     setpath=($path./home/user/su/bin)

    保存退出,执行:

    source.cshrc

    echo$CWPROOT

    echo$path

    看设置是否准确无误,如果一切都安排妥当,我们就可以进行下一步的操作了。

更方便的是直接把别人已经安装好的su文件夹,放在/home/user/下边就可以了.

 

如果你用的是多结点机群,那么只需把其他用户su和.../su/bin路径加入你的环境变量中即可,假如在 king用户下已安装过,

     exportCWPROOT=/home/king/su

    exportPATH=$PATH:

:

/home/king/su/bin

    只要把文件路径写对就没问题了.  

 

3)(这项不需要再改)

进入这个目录,可以看到makefile.config这个文件,要修改里面的三项,输入命令:

geditmakefile.config,然后修改所打开的文件:

a,将ENDIANFLAG=-DCWP_LITTLE_ENDIAN句激活(即去掉#)。

b,将include$(CWPROOT)/src/Rules/gnumake.rules句激活

c,蔽掉include$(CWPROOT)/src/Rules/oldmake.rules句,修改后保存。

d,将FC=g77,FC=f77,FC=ifort屏蔽掉,激活FC=gfortran

4)打开MakeFile文件,将“#CWPROOT=”前的“#”去掉,在等号后面添加/home/yourname/su

   (这步很关键,之前我一直报错,结果就是忽略了这步的原因)

 

   4、修改完Makefile.config,就可以安装了。

     进入到src文件夹

    执行以下命令,遵照提示往下操作就行了(一直选y).

  makeinstall  (toinstallthebasicsetofcodes)

      makextinstall(toinstalltheX-toolkitapplications)

      makefinstall(toinstalltheFortrancodes)

      makemglinstall(toinstalltheMesa/OpenGLitems)

      以下两项没有必要安装了,大家酌情处理。

  makexminstall(toinstalltheMotifapplication)(nonessential)

     makeutils    (toinstalllibcwputils)(nonessential)

     5、安装完毕后,进行测试

     suplane|suxwigb&(|为管道符号,表示数据流动,加&表示放到后台执行)

      如果出现以下图形便恭喜你安装完成了:

     

     如果没有出现以上图片,执行以下命令:

    source.bash_profile

    csh执行:

 source.cshrc

      然后再执行

     suplane|suxwigb&

   如果这次出现图形,则重启计算机,以后就可以爽快的使用了.

 

   修改makefile.config非常关键,其要领是:

认真阅读每一项的说明,并根据它给出的路径或编译器在自己的电脑内搜索,看是否一致,把没有的或重复的都注释掉,最后得出最佳编译效果。

以下是makefile.config的内容供大家参考,复制后替换原来的文件即可:

 

########################################################################

#Rulesforstandard`make'installs

#leavethenextlineuncommentedifyouareusingthestandardUnix"make"

#command. Makesurethegnumake.ruleslineiscommentedoutinthiscase.

include$(CWPROOT)/src/Rules/oldmake.rules

#Ifyougeterrormessagesabout"can'tfind$(@F),then

#youareactuallyusingGNUmake,andneedtouncommentthe

#gnumake.rulesline

#Rulesfor'GNUmake'installs(includesLinux,FreeBSD,MacOSXinstalls)

#uncommentthenextlineifyouareusing "GNUmake"

include$(CWPROOT)/src/Rules/gnumake.rules

########################################################################

#Ccompiler;changethisonlyifyouareusingadifferentC-compiler

CC=cc

########################################################################

#standardCFLAGS

CFLAGS=-I$I$(OPTC)$(LARGE_FILE_FLAG)$(ENDIANFLAG)$(XDRFLAG)$(LINEHDRFLAG)

########################################################################

#C++interfacingisstillexperimental

#C++compiler

C++=c++

########################################################################

#standardCFLAGSforC++

C++FLAGS=-I$I$(OPTC)$(LARGE_FILE_FLAG)$(ENDIANFLAG)$(XDRFLAG)

########################################################################

#underSUNOSmakesurethatyourloadlibrarypathisconsistentwith

#yourchoiceofCcompilerabove.Besuretoincludeanyotherlibrary

#paths(forexampleXwindows). SetLD_LIBRARY_PATHasashellenvironment

#variableorhardsethere.Anexample:

#LD_LIBRARY_PATH=/usr/lang/SC2.0.1patch:

/usr/lib/X11R5

#underSUNOSandLinux uncommentthenextline

#LD_LIBRARY_PATH+=$(CWPROOT)/lib:

/usr/local/lesstif/lib

#underAIXonIBM uncommentthenextline

#LD_LIBRARY_PATH=$(CWPROOT)/lib:

/usr/X11R6/LessTif/lib

#underSUNOSandRedHat(andother)Linux uncommentthenextline

LD_LIBRARY_PATH+=$(CWPROOT)/lib:

/usr/X11R6/LessTif/lib

#############################################################################

#thearchiver

AR=ar

#############################################################################

#arFLAGS

ARFLAGS=rv

#############################################################################

#ranlibdefinition

RANLIB=ranlib

#ranlibflags

RANFLAGS=

#underIRIX(SiliconGraphics,SGI),youprobablywillhave

#tousethislineforRANLIB(alsoforSOLARIS)

#RANLIB=ar-ts

#############################################################################

#SomeMakefileshavechangethepermissionsofexecutableandotheroutput

#chmodlineforincludefiles.Theselinesshouldnotbechanged.

ICHMODLINE=chmod664$@

#chmodlineforexecutables

MCHMODLINE=chmod775$@

#UncommentthetwolinesbelowifinstallingunderCYGWIN32underWindows

#ICHMODLINE=

#MCHMODLINE=

#############################################################################

#DefaultCpreprocessor(cpp)definition

#thisistheoneyouwilluseonmostsystems

#AIX,IRIXifusingthenativecccompiler,Linux

CPP=/lib/cpp

#underCYGWIN32,thisseemslikeshootingatamovingtarget.

#onepossibilityistosimplyuncommentthenextline

#CPP=/usr/bin/cpp

#underSolaris,IRIX,AIX,andpossiblyotherwithgcccompiler,use:

#CPP=gcc-E

#makesurethepathtogccmatchesthatintheCC=line

#

#Youcantellyouneedtoinvokegcc-E ifyoucompilethepackage

#andgeterrormessagesaboutprogramsnotrecognizingheaderfields.

#usethisunderSOLARIS,ifusingthedefaultCcompiler

#CPP=/usr/ccs/lib/cpp

#usethisonCrayT3E

#CPP=/opt/ctl/bin/cpp

#usethisonMacOSXandFreeBSD

#CPP=/usr/bin/cpp

######################################################################

######################################################################

#Fortanmaterials.

#ThemajorityoftheSUpackagedoesnotdependonfortran,soyou

#arefreetoignorethisifyouarenotplanningondoingthe'finsintall'

#portionoftheinstallation.

#

#Pleasenote,theremaybeadditionalcompilerflagsnecessarytoget

#theFortrancodestoworkproperly.Youmayneedtoexperiment.

#

#DefaultforIBMRS6000,SGI,alsofortheIntelcompilerifort

OPTF=-O

#DefaultforLinuxandotherGCCinstalls(mostlikelyFreeBSDandMacOSX)

#OPTF=-O-static-m486-ansi-fno-globals-fno-automatic-fno-second-underscore

#OPTF=-O-static-m486-fno-automatic-fno-second-underscore

#UsethisforHP

#(Ifyoufigureoutwhatgoesin

#thenextline, emailme:

john@dix.mines.edu)

#OPTF=

######################################################################

#Fortrancompiler

#default(useg77onLinuxsystems,f77thereisreallyf2c)

FC=f77

#GNUfortrancompiler(Linuxsystems)

FC=g77

#GNUfortrancompiler(LinuxsystemsFedoraCore5)

#FC=gfortran

#FortrancompilerontheCrayT3E

#FC=f90

#IntelFortranCompiler

#FC=ifort

######################################################################

#JAVAcompiler

JC=javac

#############################################################################

#Someconvenientabbreviations(don'tchangethis)

include$(CWPROOT)/src/Rules/abbrev.rules

#####################################################################

#####################################################################

#

#X-windowsrelatedmaterials:

#

#ThepathstoX11includefilesandX11librariesarenot

#consistentbetweenvendors.Thefollowingaregenericpaths.

#Youmayneedtochangethese,iftheincludefilesandlibraries

#arenotintheselocationsonyourmachine.

#Thedefaultpathsshouldworkonmanysystems,forexample,IBMRS6000.

#ExamplesofthepathSUNaregivenhere.

#

#Troubleshooting:

 MakesurethatyourmachinereallyhastheX-windows

#librariesandincludefiles.Makesurethatthesefilesreally

#arewhereyouthinktheyare.

#####################################################################

#  X11includeandlibrarypaths

####

#Generic(RS6000,SGI)

#X11includepath

IX11=/usr/local/include

#X11librarypath

LX11=/usr/local/lib

####

####

##ThefollowingX11includeandX11libpathsarerecommendedfor

##SUN,providedthatthestandard X11stuffisreally/usr/openwin.

#X11includepath

#IX11=/usr/openwin/include

#X11librarypath

#LX11=/usr/openwin/lib

####

####

##ThefollowingpathswouldbeusedunderLinux

##andpossiblyunderSCOUnixinstalls

#X11includepath

IX11=/usr/X11R6/include

#X11librarypath

LX11=/usr/X11R6/lib

####

##AdditionalXlibrariesthatmaybeneededforsomesystems

##Example:

uncommentforCYGWIN32installs

#XLFLAGSADD=-lSM-lICE

####

#Motif

#

#Note:

YourmachinecanberunningtheMotifWindowManager,butnothavethe

#MotifDevelopersPackage(includefileswithnameslike Xm.h

#andlibrarieswithnameslikelibXm.a).Youcanonlydothexminstall

#ifyouhavetheseincludefilesandlibraries.

#

#includepath

IMOTIF=/usr/local/include

#librarypath

LMOTIF=/usr/local/lib

#ExampleofLesstif

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 工作范文 > 行政公文

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1