geant4安装
合集下载
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
Geant4安装(续)
8、Once all of the questions have been answered, you will be told: WARNING: the generated configuration file can be edited if necessary! You can introduce any change to the configuration file /u/ey/perl/geant4/geant4.9.2.p02/.config/bin/Linuxg++/config.sh before the final installation. To do so, use a shell escape now (e.g. !vi /u/ey/perl/geant4/geant4.9.2.p02/.config/bin/Linuxg++/config.sh). Press [Enter] to start installation or use a shell escape to edit config.sh:
configurebuild此时configure启动并提出一系列问题绝大部分问题只要enter接受默认设置即可意外地方将重点说明
Installation of Geant4 V4.9.2.p02 on Ubuntu Linux
前提条件
安装好了Ubuntu Linux系统; 安装好了指定的GCC版本( gcc 3.4.6 or gcc 4.2.1 ),注:其它版本可能也可以,但建议指 定为gcc 4.2.*版本; 网络连通;
Geant4安装(续)
12、安装
cd /opt/geant4/geant4.9.2.p02 ./Configure -install. 完成geant4安装
Geant4安装(续)
13、Creating the setup script
cd /opt/geant4/geant4.9.2.p02 ./Configure Your directory ~/geant4/geant4.9.2.p02 will now contain two scripts:
Geant4安装(续)
7、问题回答(2)
When the configure script says:
Could not find CLHEP installed on this system! Please, specify where CLHEP is installed:
First, confirm that you have installed your CLHEP Second, Make sure you have lib, bin and include subdirectories in the special directory Enter the absolute path of CLHEP:
Geant4安装(续)
6、预配置(Configure) geant4
cd /opt/geant4/geant4.9.2.p02 ./Configure –build 此时Configure启动,并提出一系列问题,绝大部分 问题只要Enter接受默认设置即可,意外地方将重 点说明;(In most cases, you can just take the default response (by hitting carriage return).)
Geant4安装(续)
9、开始编译
Hit Enter. You will then see:
Now starting Geant4 libraries build... 请等待…
Geant4安装(续)
10、编译过程中的注意事项:
Once you see any lines like: Compiling ...
解压G4EMLOW.6.2.tar.gz:
此时G4EMLOW的绝对路径是:
Geant4安装(续)
5、清理Linux环境 make sure you don't have any pre-existing Geant4 environment variables. From a Terminal or xterm window: printenv | grep G4 If any variables containing “G4” show up, find out what is setting them and remove them.
with no errors,
the compilation is successfully under way.
Geant4安装(续)
11、最后的编译信息
… 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.2.p02/.config/bin/Linuxg++/g4make.log ############################################### #####
Geant4 Data Files
CLHEP安装
假设当前Ubuntu用户名y-lei; 1、下载clhep-2.0.4.2.tgz到/home/y-lei; 2、把clhep-2.0.4.2.tgz放置到合适位置并解压: cd /opt sudo mkdir /opt/CLHEP sudo mv /home/y-lei/clhep-2.0.4.2.tgz /opt/CLHEP cd /opt/CLHEP tar -zxvf clhep-2.0.4.2.tgz
This tells Geant4 that you want to include the optional RayTracerX Visualization driver.
Geant4安装(续)
7、问题回答(5)
其它的问题接受默认值(Take the default for everything else. )
env.sh env.csh
Geant4安装(续)
14、创建独立的Geant4 Work Directory
cd /home/y-lei mkdir /home/y-lei/g4work cd /home/y-lei gedit .bashrc 在打开的文件末尾添加:
15、设置Terminal环境参数
export G4WORKDIR= /home/y-lei/g4work export LD_LIBRARY_PATH=/opt/CLHEP/lib/:$LD_LIBRARY_PATH source /opt/geant4/geant4.9.2.p02/
./ configure的情况见参考文献[1]
CLHEP安装(续)
5、编译(make)CLHEP
cd /opt/CLHEP/2.0.4.2/CLHEP
sudo make Make 结果见参考文献[1]
CLHEP安装(续)
6、安装CLHEP
cd /opt/CLHEP/2.0.4.2/CLHEP
/opt/CLHEP
Geant4安装(续)
7、问题回答(3) Take the default for everything else except:
When it asks about:
G4VIS_BUILD_OPENGLX_DRIVER G4VIS_USE_OPENGLX Enter: y
This tells Geant4 that you want to include the optional OpenGL Visualization driver.
Geant4安装(续)
7、问题回答(4)
When it asks about:
G4VIS_BUILD_RAYTRACERX_DRIVER G4VIS_USE_RAYTRACERX Enter: y
Geant4安装(续)
4、安装前需首先指定Geant4的data的参数
下载G4EMLOW.6.2.tar.gz并放置到/home/y-lei 移动G4EMLOW.6.2.tar.gz
sudo mkdir /opt/geant4/geant4.9.2.p02/data sudo mv /home/y-lei/G4EMLOW.6.2.tar.gz /opt/geant4/geant4.9.2.p02/data cd /opt/geant4/geant4.9.2.p02/data tar -zxvf G4EMLOW.6.2.tar.gz /opt/geant4/geant4.9.2.p02/data/G4EMLOW6.2
CLHEP安装(续)
3、此时的CLHEP路径是:
/opt/CLHEP/2.0.4.2/CLHEP
4、预配置(configure)CLHEP
cd /opt/CLHEP/2.0.4.2/CLHEP
sudo ./configure --prefix /opt/CLHEP
指定CLHEP安装路径
sudo make install 安装后You will now have new three directories as follows:
/opt/CLHEP/include /opt/CLHEP/lib /opt/CLHEP/bin
7、安装结束
Geant4安装
1、下载geant4.9.2.p02.tar.gz并放置到/home/y-lei 2、建立安装文件夹,并移动geant4.9.2.p02.tar.gz
Geant4所需安装文件
CLHEP
http://proj-clhep.web.cern.ch/projclhep/DISTRIBUTION/distributions/clhep2.0.4.2.tgz
Geant4 package
http://geant4.web.cern.ch/geant4/support/source/g eant4.9.2.p02.tar.gz http://geant4.web.cern.ch/geant4/support/source/ G4EMLOW.6.2.tar.gz
Geant4安装(续)
7、问题回答(1)
Along the way you will see a message “ Failed to locate one or more of the Geant4 data libraries... " Don't worry about this. The additional data libraries are not required for the simple physics in our initial examples. They can be loaded later as needed. For now, just accept the default response (by hitting carriage return).
sudo mkdir /opt/geant4 sudo mv /home/y-lei/geant4.9.2.p02.tar.gz /opt/geant4
3、解压
cd /opt/geant4 tar -zxvf geant4.9.2.p02.tar.gz 此时geant4的绝对路径是: /opt/geant4/geant4.9.2.p02