Readme

Version du 9/02/2021 Geant4.10.07.p01
** What Vm G4.10.7.p01_CTOS8.7z is :

A linux system with CentOS 8 distribution (https://www.centos.org/)
It contains several scientific libraries such as Geant4 Version 10.07.p01, OpenScientist, Root 6.18/04, …

** Requirements

VmWare Workstation Player for Windows/Linux (recommended version 15.x), Vmware Fusion for MacOS (http://www.vmware.com)
at least 4Go RAM for the virtual machine, the amount of memory can be changed by editing the virtual machine settings
at least 40 Go of free disk space for the zip file and the decompressed vm
the number of processors can also be changed in the virtual machine settings, by default 2 processors/cores are set

** Downloads

Download the G4.10.7.p01_CTOS8.7z zipped file for VmWarePlayer
Download the current free version of software VMware Workstation Player for Windows PC, Vmware Fusion for MAC
Download if needed the free software 7Zip if you need a free software to decompress these files : http://www.7-zip.org/

** Installation

Install Vmware Player (VmWare Fusion) if needed
Decompress the G4.10.7.p01_CTOS8.7z file in a directory
At the end you can then delete the zipped file

** How to use the virtual machine ?

Execute Vmware Workstation Player (Fusion) to open the virtual machine -> From VmWare Player, open the .vmx file

When you power on the virtual machine, VMware Player displays a message asking whether you have moved or copied the virtual machine. You have to answer « I copied it ». This will create a new uuid and a new mac address for the virtual machine necessary for network connection.
If VmWare Player ask to install or upgrade Vmware Tools, you have to do it because it is necessary for the use of network and shared folders between host and guest system.

Once your virtual machine is powered on, you have a real CentOS 8 system. A default user account exists, the login account is:

local1, the password is local1
root password is centos8

The general environment is defined in the /usr/local/Env/CTOS8 file. The personal environment is defined in the /home/local1/.cshrc and can be completed in the /home/local1/.ucshrc
Specifics environments are defined in the /usr/local/Modules/modulefiles
Source files and build files for geant4 are in the /usr/local/src directory: $G4SRC

** To share folders with Windows system
It is possible to share folders between the Windows host and the Linux guest

Activate the shared Folders in the VMware Player menu, select « Player », « Manage » then « Virtual machine setting » and then in the « Option » menu, select « Shared Folder », make sure the Always enabled option is selected,
then Add to add a new share folder, there you can give a Name to your shared directory and select the Host Directory to share with the Browse button.
Verify that vmwaretools are well installed, if a message ask to install VmwareTools, click ok and proceed to the installation
Under your linux session, your exchange directory is located at /mnt/hgfs/Name_Of_Share

** To add a new disk

Shutdown the virtual machine
Select « Edit Virtual machine setting » in the Vmware Player menu
Click « Add… » button and then Hard Disk and Next,
Select the disk type NVMe and « Next »
Specify the size of the disk you want to create and the name, and click « Finish ».
Then start the Virtual Machine and connect with root account
You have to create a new partition under the linux session with the command fdisk : fdisk /dev/nvme0n4
(n for new, p for primary, w for write and format it : mkfs.ext4 /dev/nvme0n4p1
To mount the new partition automatically, create a mount point (mkdir /data for example) and declare it in the /etc/fstab file

** To BUILD examples
Please refer to the documentation http://geant4.web.cern.ch/geant4/support/userdocuments.shtml

For example with the B1 example,
mkdir $HOME/buildB1
cd $HOME/buildB1
cmake -DGeant4_DIR=$G4COMP $G4EXAMPLES/basic/B1
make
./exampleB1