Readme

Geant4.11.2.1, version du 13/03/2024
** What Vm G4.11.2.1_RockyLinux9.7z is :

A linux system with Rocky Linux 9 distribution (https://rockylinux.org/)
It contains several scientific libraries such as :
Geant4 Version 11.2.1, OpenScientist, Root 6.28.06, …

** Requirements

VmWare Workstation Player for Windows/Linux (recommended version 17.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.11.2.1_RockyLinux9.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.11.2.1_RockyLinux9.7z file in a directory
At the end you can then delete the zipped file .7z

** 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 Linux system. A default user account exists, the login account is:

local1 user, the password is local1
root password is rocky9

The general environment is defined in the /usr/local/Env/RCK9 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/share/Modules/modulefiles/geant4/
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

Take care of using this functionality only to share files and folders, it is not a working directory. Bad performances will result of the use of this /mnt/hgfs directory as a working directory.

** To add a new disk

The virtual machine must be Shutdown to add a new disk

  • 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/nvme0n3
    n for new partition
    p for primary
    default choice for the partition number
    w for write and validate the creation of the new disk
  • Then format it with: mkfs.xfs /dev/nvme0n3p1
  • create a mount point : mkdir /newdisk
  • => mount /dev/nvme0n3p1 /newdisk
  • Change permissions : chown -R local1 /newdisk, chmod -R 775 /newdisk
  • To mount the new partition automatically, add 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 $G4EXAMPLES/basic/B1
  • make
  • ./exampleB1