




已阅读5页,还剩14页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
G 4 安 装 说 明 书Installing Geant4 Release 4.9.0 on LinuxInstallation guides are available for a variety of different Geant4 releases and operating systems. Be sure to use the appropriate guide for your Geant4 release and system. The full set of guides can be found at:/installationContents:What are the two pieces of software required for building Geant4?Getting and Installing CLHEPGetting Geant4Doing the Initial BuildCreating the setup scriptThe Geant4 Work DirectorySelecting an Example ApplicationConfiguring the EnvironmentBuilding an Example ApplicationRunningSingle versus Multi-User InstallationWhat are the two pieces of software required for building Geant4?gcc 3.2.3 or 3.4.5:gcc is the compiler that is recommended for Geant4 on Linux. Users have also had success with gcc 4.1.1. You will not have success with earlier versions of gcc.To check your version, type: gcc v.CLHEP:CLHEP is a set of base libraries that have long provided great functionality for the particle physics community. They provide things like matrix manipulations and four-vector tools. The Geant4 collaboration has chosen to use these libraries rather than re-invent these wheels. Please note that while CLHEP and Geant4 both come out of the particle physics communities, they are separate products - the Geant4 collaboration is not responsible for maintenance, distribution or documentation of CLHEP.Getting and Installing CLHEPGo to the CLHEP source download page:http:/proj-clhep.web.cern.ch/proj-clhep/DISTRIBUTION/clhep.htmlFrom the Source section near the bottom of the page, select clhep-.tgzwhich corresponds to:http:/proj-clhep.web.cern.ch/proj-clhep/DISTRIBUTION/distributions/clhep-.tgzThe file is about 5MB.Put it into your directory of choice, such as:/CLHEPNavigate to this directory and unpack the file:cd /CLHEPtar -zxvf clhep-.tgzThe unpacking process will begin, starting with://CLHEP//CLHEP/CVS//CLHEP/CVS/Root/CLHEP/CVS/RepositoryAnd ending with:/CLHEP/install-sh/CLHEP/config.guess/CLHEP/config.sub/CLHEP/Makefile.in/CLHEP/configureFor the following step, note that there are two dashes in a row before the word prefix.Also note that for this command you should use the absolute path for your CLHEP, such as:/u/ey/perl/CLHEPrather than a relative path, such as:/CLHEPAnd be sure to point to your top level CLHEP directory, NOT:/u/ey/perl/CLHEP//CLHEPNow navigate into the unpacked directory and begin the configuration process.Of course, substitute your actual CLHEP path here:cd /CLHEP./configure -prefix /u/ey/perl/CLHEPYou should get a response that starts with:checking build system type. i686-pc-linux-gnuchecking host system type. i686-pc-linux-gnuchecking target system type. i686-pc-linux-gnuchecking for a BSD-compatible install. /usr/bin/install -cchecking whether build environment is sane. yesAnd ends with:config.status: creating test/exctest4.shconfig.status: creating test/exctestNothrow.shconfig.status: creating test/excDblThrow.shconfig.status: creating Exceptions/defs.hconfig.status: executing depfiles commandsThe complete output from the above command can be found in this same web directory as:CLHEPConfigure.txtRun the build process:makeYou should get a response that starts with:Making all in Unitsmake1: Entering directory /afs//u/ey/perl/CLHEP//CLHEP/UnitsMaking all in Unitsmake2: Entering directory /afs//u/ey/perl/CLHEP//CLHEP/Units/Unitsmake all-amAnd ends with:make1: Entering directory /afs//u/ey/perl/CLHEP//CLHEP./build-clheplib Units Vector Evaluator GenericFunctions Geometry Random Matrix RandomObjects RefCount Cast Exceptionsrm -f libCLHEP-.aliblist=./getObjectList -static Units Vector Evaluator GenericFunctions Geometry Random Matrix RandomObjects RefCount Cast Exceptions; ar cru libCLHEP-.a $liblist; ranlib libCLHEP-.arm -f libCLHEP-.soliblist=./getObjectList -shared Units Vector Evaluator GenericFunctions Geometry Random Matrix RandomObjects RefCount Cast Exceptions; g+ -O -ansi -pedantic -Wall -D_GNU_SOURCE -g -O2 -o libCLHEP-.so -shared -Wl,-soname,libCLHEP-.so $liblist -o libCLHEP-.somake1: Leaving directory /afs//u/ey/perl/CLHEP//CLHEPThe complete output from the above command can be found in this same web directory as:CLHEPMake.txtFinally, move the build products to their installation area:make installYou should get a response that starts with:Making install in Unitsmake1: Entering directory /afs//u/ey/perl/CLHEP//CLHEP/UnitsMaking install in Unitsmake2: Entering directory /afs//u/ey/perl/CLHEP//CLHEP/Units/UnitsAnd ends with:test -z /afs//u/ey/perl/CLHEP/lib | mkdir -p - /afs//u/ey/perl/CLHEP/lib /usr/bin/install -c -m 644 libCLHEP-.a /afs//u/ey/perl/CLHEP/lib/libCLHEP-.a ranlib /afs//u/ey/perl/CLHEP/lib/libCLHEP-.a /usr/bin/install -c libCLHEP-.so /afs//u/ey/perl/CLHEP/lib/libCLHEP-.somake2: Nothing to be done for install-data-am.make2: Leaving directory /afs//u/ey/perl/CLHEP//CLHEPmake1: Leaving directory /afs//u/ey/perl/CLHEP//CLHEPThe complete output from the above command can be found in this same web directory as:CLHEPInstall.txtYou will now have directories such as:/CLHEP/includeand/CLHEP/libYoure done setting up CLHEP.Much more detailed instructions on installation of CLHEP are available from the CLHEP web site:http:/proj-clhep.web.cern.ch/proj-clhep/INSTALLATION/newCLHEP-install.htmlGetting Geant4From the top of the Geant4 home page:http:/geant4.web.cern.ch/geant4/Select Download from near the top right corner of the page.Select Unix tar format, compressed using gzipwhich corresponds to:http:/geant4.web.cern.ch/geant4/support/source/geant4.9.0.tar.gzThe file is about 16M.Put it into your directory of choice, such as:/geant4Navigate to this directory and unpack the file:cd /geant4tar -zxvf geant4.9.0.tar.gzThe unpacking process will begin, starting with:geant4.9.0/geant4.9.0/ReleaseNotes/geant4.9.0/ReleaseNotes/Patch4.4.0-1.txtgeant4.9.0/ReleaseNotes/Patch4.4.0-2.txtgeant4.9.0/ReleaseNotes/Patch4.4.1-1.txtAnd ending with:geant4.9.0/source/visualization/modeling/src/G4TrajectoryOriginVolumeFilter.ccgeant4.9.0/source/visualization/modeling/src/G4TrajectoryParticleFilter.ccgeant4.9.0/source/visualization/modeling/src/G4VModel.ccgeant4.9.0/source/visualization/modeling/src/G4VTrajectoryModel.ccgeant4.9.0/source/visualization/modeling/src/G4VisTrajContext.ccDepending on the physics of your particular application, you may need to install additional data files. These data files can be downloaded separately from the Geant4 source distribution page (the same place where you got Geant4 itself). Create a new folder within /geant4/geant4.9.0 to hold any of these required data files./geant4/geant4.9.0/dataFor now, pick up the data files for low energy electromagnetic processes:http:/geant4.web.cern.ch/geant4/support/source/G4EMLOW.4.3.tar.gzThe file is about 7.6M.Put the file into your new data directory.Navigate to this directory and unpack the file:cd /geant4/geant4.9.0/datatar -zxvf G4EMLOW.4.3.tar.gzThe unpacking process will begin, starting with:G4EMLOW4.3/G4EMLOW4.3/READMEG4EMLOW4.3/auger/G4EMLOW4.3/auger/au-tr-pr-10.datG4EMLOW4.3/auger/au-tr-pr-11.datAnd ending with:G4EMLOW4.3/tripdata/pp-trip-cs-9.datG4EMLOW4.3/photoelectric_angular/G4EMLOW4.3/photoelectric_angular/ftab0.datG4EMLOW4.3/photoelectric_angular/ftab1.datG4EMLOW4.3/HistoryDoing the Initial BuildTAKE YOUR TIME AT THIS STAGE, DONT RUSH IT.Mistakes made at this stage can be very time-consuming to correct. Slow down.Maybe get a cup of coffee (or a glass of wine) before you proceed. Breathe.Finally, unless youre absolutely sure you are starting from a nice clean system, make sure you dont have any pre-existing Geant4 environment variables. You can use the printenv command to show all variables, and filter this with a grep for the string G4 as follows:From a Terminal or xterm window:printenv | grep G4If any variables show up, find out what is setting them and remove them. They might be coming from your .login or .cshrc file or from some other script that you invoke upon login for some other project. Take the time now to find the cause and resolve it.From a Terminal or xterm window:cd /geant4/geant4.9.0./Configure -buildYou will be asked a series of questions.In most cases, you can just take the default response (by hitting carriage return).But pay close attention so that you do not accept the default for the following questions:When it says:Could not find CLHEP installed on this system!Please, specify where CLHEP is installed:First, confirm that you have installed your CLHEP to/u/ey/perl/CLHEPOr wherever youve decided to keep CLHEP.Make sure you have lib, bin and include subdirectories in that directory.If not, recheck your CLHEP installation. If so, proceed.Note that for this command you should use the absolute path for your CLHEP, such as:/u/ey/perl/CLHEPrather than a relative path, such as:/CLHEPOf course, substitute your actual CLHEP path here.Enter: /u/ey/perl/CLHEPTake the default for everything else except:When it asks about:G4VIS_BUILD_OPENGLX_DRIVERG4VIS_USE_OPENGLXEnter: yThis tells Geant4 that you want to include the optional OpenGL Visualization driver.When it asks about:G4VIS_BUILD_RAYTRACERX_DRIVERG4VIS_USE_RAYTRACERXEnter: yThis tells Geant4 that you want to include the optional RayTracerX Visualization driver.Take the default for everything else.Once all of the questions have been answered, you will be told:WARNING: the generated configuration filecan be edited if necessary!You can introduce any change to the configuration file/u/ey/perl/geant4/geant4.9.0/.config/bin/Linux-g+/config.sh before the final installation. To do so, use a shell escape now (e.g. !vi /u/ey/perl/geant4/geant4.9.0/.config/bin/Linux-g+/config.sh).Press Enter to start installation or use a shell escape to edit config.sh: At this point, what you have seen in this question and answer session should match what you find in this web directory as:Geant4Build.txtYou are ready to proceed with the build.Hit Enter.You will then see:Now starting Geant4 libraries build. On this machine the G4SYSTEM=Linux-g+On this machine the G4INSTALL=/u/ey/perl/geant4.9.0On this machine the G4TMP=/u/ey/perl/geant4.9.0/tmpOn this machine the G4LIB=/u/ey/perl/geant4.9.0/libOn this machine the G4LEVELGAMMADATA=/u/ey/perl/geant4.9.0/data/PhotonEvaporation2.0On this machine the G4RADIOACTIVEDATA=/u/ey/perl/geant4.9.0/data/RadioactiveDecay3.2On this machine the G4LEDATA=/u/ey/perl/geant4.9.0/data/G4EMLOW4.3On this machine the G4NEUTRONHPDATA=/u/ey/perl/geant4.9.0/data/G4NDL3.11On this machine the CLHEP_BASE_DIR=/u/ey/perl/CLHEPOn this machine the CLHEP_INCLUDE_DIR=/u/ey/perl/CLHEP/includeOn this machine the CLHEP_LIB_DIR=/u/ey/perl/CLHEP/libOn this machine the CLHEP_LIB=CLHEPOn this machine the G4VIS_BUILD_OPENGLX_DRIVER=1On this machine the G4VIS_BUILD_RAYTRACERX_DRIVER=1On this machine the G4VIS_USE_OPENGLX=1On this machine the G4VIS_USE_RAYTRACERX=1On this machine the XMFLAGS=On this machine the XMLIBS=On this machine the XMFLAGS=On this machine the XAWFLAGS=On this machine the XAWLIBS=On this machine the G4LIB_BUILD_STATIC=1On this machine the G4LIB_USE_GRANULAR=1Starting build.* Installation Geant4 version : geant4-09-00 Copyright (C) 1994-2007 Geant4 Collaboration *Making dependency for file src/G4ios.cc .Making dependency for file src/G4coutDestination.cc .Making dependency for file src/G4VStateDependent.cc .Making dependency for file src/G4VNotifier.cc .Making dependency for file src/G4VExceptionHandler.cc .Making dependency for file src/G4UnitsTable.cc .Making dependency for file src/G4Timer.cc .Making dependency for file src/G4StateManager.cc .Making dependency for file src/G4SliceTimer.cc .Making dependency for file src/G4PhysicsVector.cc .Making dependency for file src/G4PhysicsTable.cc .Making dependency for file src/G4PhysicsOrderedFreeVector.cc .Making dependency for file src/G4PhysicsLogVector.cc .Making dependency for file src/G4PhysicsLnVector.cc .Making dependency for file src/G4PhysicsLinearVector.cc .Making dependency for file src/G4PhysicsFreeVector.cc .Making dependency for file src/G4OrderedTable.cc .Making dependency for file src/G4LPhysicsFreeVector.cc .Making dependency for file src/G4GeometryTolerance.cc .Making dependency for file src/G4Exception.cc .Making dependency for file src/G4ErrorPropagatorData.cc .Making dependency for file src/G4DataVector.cc .Making dependency for file src/G4AllocatorPool.cc .Compiling G4AllocatorPool.cc .Compiling G4DataVector.cc .Compiling G4ErrorPropagatorData.cc .Compiling G4Exception.cc .Once you see any lines like:Compiling G4AllocatorPool.cc .with no errors,the compilation is successfully under way.If you get a lot of warnings of the form/usr/include/c+/3.2.3/i386-redhat-linux/bits/codecvt_specializations.h:84: warning: unused parameter int _ibomjust ignore them. These result from a bug in certain versions of gcc. The bug is harmless.Adjust your machines power management properties so that it doesnt go to sleep, and then walk away for a long long time. Wait, and wait, and wait, for the initial compilation to run.The same information that is showing on the console is also being written to a log file so that you can review it later if necessary. The information will appear in:/geant4/geant4.9.0/.config/bin/Linux-g+/g4make.logAn example of how this log file should look can be found in this same web directory as:Geant4Make.txtEventually, you will see messages stating that libname.map has been built, then you will see messages about successful completion:Libmap stage. Searching for GNUmakefiles and sorting .Weeding out paths and files .Making libname.map starter file .Making libname.map . Reading library name map file. Reading dependency files. Checking for circular dependencies. Reordering according to dependencies. Writing new library map file.Libraries installation completed !# Your Geant4 installation seems to be successful! # To be sure please have a look into the log file: # /u/ey/perl/geant4/geant4.9.0/.config/bin/Linux-g+/g4make.log #While the Geant4 collaboration works hard to support a large variety of different Linux systems, there may be special things you need to do to make it work for your particular Linux. If you have a problem in the above build procedure, such as if your build fails to find some of the OpenGL libraries (error messages about this may include references to libXmu), look for hints in the Geant4 Installation and Configuration User Forum::5090/Geant4-HyperNews/indexLinux users are generally very helpful about documenting such issues for each other. Your question has very likely already been documented in that forum. If you dont find your answer there, post it as a question.Creating the setup scriptThe configure process has set up some environment variables that you will want to have in future sessions. Have configure make you an environment setup script by typing:./Configure(that was with no options, as opposed to ./Configure build that you typed earlier).You will see the following: - Geant4 Toolkit Installation - (setting environments for USER )-The Geant4 toolkit installation was found.The files env.csh will be copied to your current directory.For setting Geant4 environments you should make:source env.cshor. env.shIt will also check G4WORKDIR setting and set it toyour HOME if needed.You can use these files also for further modifications(adding your own environments).-Your directory /geant4/geant4.9.0 will now contain two scripts:env.shandenv.cshThe Geant4 Work DirectoryYou have now built the Geant4 toolkit. If you have learned a little about Geant4, you will know that Geant4 is not an application but rather a toolkit from which you can build any number of applications. So before you can test Geant4, you need an example application.You should create a new directory, outside of your Geant4 installation area, where you will keep your example applications. This separation of spaces will help you avoid accidentally messing up your main Geant4 installation, and will
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 互联网数据中心租赁合同续约与网络安全保障协议
- 石家庄城市更新项目二手房收购协议合同
- 离婚协议财产分割与子女抚养费、教育费用补充协议
- 2025房地产开发合同中“阴阳合同”的认定
- 离婚户口迁移、赡养费及子女抚养权转移合同
- 知识产权知识产权纠纷调解与和解常年法律顾问合同
- 2025版租赁合同样本:挖掘机、装载车、吊车、平板车、炮头桩基机械租赁协议模板
- 二手房买卖合同范本:针对房产交易资金监管及安全
- 现代学徒制校企智能制造人才培养合作协议范本
- 离婚时知识产权归属及使用许可协议范本
- 2026农业银行四川省分行秋季校园招聘1374人考试参考题库及答案解析
- 第9课《天上有颗“南仁东星”》 课件 2025-2026学年统编版语文八年级上册
- 《山水相逢》课件2025-2026学年人美版(2024)八年级美术上册
- 2025年芜湖市鸠江区医疗卫生事业单位公开招聘工作人员22名考试参考题库及答案解析
- 法警安全检查培训课件
- AI+智慧医院高质量发展 信息化建设方案
- 人员密集场所安全培训教学课件
- 村干部笔试试题及答案
- 项目管理业务知识培训课件
- 知识产权保护与运用培训课件
- 小猪逛果园课件
评论
0/150
提交评论