View
218
Download
0
Tags:
Embed Size (px)
Citation preview
6 November 2009 Upgrading Your Geant4 Release J. Perl 1
Upgrading Your Geant4 Release
Joseph Perl, SLAC
Geant4 v9.2p02
6 November 2009 2Upgrading Your Geant4 Release J. Perl
ContentsContents
About the new Geant4 release, 9.3About the new Geant4 release, 9.3 Major versus Minor releasesMajor versus Minor releases What to look for in the release notesWhat to look for in the release notes How to upgradeHow to upgrade
6 November 2009 3Upgrading Your Geant4 Release J. Perl
About the New Geant4 Release, 9.3About the New Geant4 Release, 9.3 Geant4 version 9.3Geant4 version 9.3
scheduled for release on December 18thscheduled for release on December 18th improvements for physics and usabilityimprovements for physics and usability
as such, we recommend all users upgrade to this release as such, we recommend all users upgrade to this release unless they have a specific reason to hold backunless they have a specific reason to hold back
Among the improvements and new features:Among the improvements and new features: Geometry: improvements to some solids (faster, more Geometry: improvements to some solids (faster, more
accurate), improved GDML reader, G4Region to hold fields, etc.accurate), improved GDML reader, G4Region to hold fields, etc. Physics: faster startup, faster running, improved hadronic Physics: faster startup, faster running, improved hadronic
models, improved integration between standard and low energy models, improved integration between standard and low energy EM, improved multiple scattering, reverse monte carlo, EM, improved multiple scattering, reverse monte carlo, improved optical processes, etc. etc. etc.improved optical processes, etc. etc. etc.
Visualization: Qt, gMocrenVisualization: Qt, gMocren Improved examplesImproved examples and moreand more
6 November 2009 4Upgrading Your Geant4 Release J. Perl
Major versus Minor ReleasesMajor versus Minor Releases
Geant4 release numbers are of the form X.YGeant4 release numbers are of the form X.Y X is the Major release numberX is the Major release number Y is the Minor release numberY is the Minor release number
Release 9.3 is a Minor releaseRelease 9.3 is a Minor release Release 10.0 will be the next Major releaseRelease 10.0 will be the next Major release
Minor releases ARE NOT ALLOWED to break user code.Minor releases ARE NOT ALLOWED to break user code. So, for example, when you move from release 9.2 to 9.3,So, for example, when you move from release 9.2 to 9.3,
you should not need to change your user codeyou should not need to change your user code You will likely get slightly different results in the new minor releaseYou will likely get slightly different results in the new minor release And you may have access to additional new featuresAnd you may have access to additional new features But nothing in your code should break as a result of the upgradeBut nothing in your code should break as a result of the upgrade
Major releases ARE ALLOWED to break user code.Major releases ARE ALLOWED to break user code. So, for example, when you move from release 9.3 to 10.0,So, for example, when you move from release 9.3 to 10.0,
you may need to change your user code.you may need to change your user code. The release notes will tell you what you might need to change.The release notes will tell you what you might need to change.
6 November 2009 5Upgrading Your Geant4 Release J. Perl
Patch ReleasesPatch Releases
A Patch release corrects bugs in a regular releaseA Patch release corrects bugs in a regular release Release number ends in p01, p02, etc.Release number ends in p01, p02, etc. Such as Geant4.9.2.p02Such as Geant4.9.2.p02
Contains only bug fixesContains only bug fixes No new featuresNo new features
It is always advisable to downloaded the latest patchIt is always advisable to downloaded the latest patch The patch release notes will tell you exactly what has changed, so you can The patch release notes will tell you exactly what has changed, so you can
decide whether you absolutely need to upgradedecide whether you absolutely need to upgrade
6 November 2009 6Upgrading Your Geant4 Release J. Perl
What to Look for in the Release NotesWhat to Look for in the Release Notes Each Geant4 release comes with a set of release notes.Each Geant4 release comes with a set of release notes.
Read them before you move to the new release.Read them before you move to the new release.
In particular, read:In particular, read: Supported platforms/compilersSupported platforms/compilers CLHEP versionCLHEP version Items for migrationItems for migration
of the user codeof the user code Expected effects onExpected effects on
physics and performancephysics and performance
6 November 2009 7Upgrading Your Geant4 Release J. Perl
Supported Platforms and CompilersSupported Platforms and Compilers May change at Major or Minor releaseMay change at Major or Minor release If your platform and compiler are no longer in the supported list,If your platform and compiler are no longer in the supported list,
you can either upgrade them or just try with what you have:you can either upgrade them or just try with what you have: If Geant4 still builds and starts OK, don’t worryIf Geant4 still builds and starts OK, don’t worry If there are problems with build or startup, try upgrading to the new If there are problems with build or startup, try upgrading to the new
supported platform or compilersupported platform or compiler
6 November 2009 8Upgrading Your Geant4 Release J. Perl
CLHEP VersionCLHEP Version
May change at Major or Minor releaseMay change at Major or Minor release We don’t change CLHEP versions very often,We don’t change CLHEP versions very often,
but if we do it will be for a good reasonbut if we do it will be for a good reason If you use the wrong CLHEP version, your code mayIf you use the wrong CLHEP version, your code may
still link and run but your results may not be correct.still link and run but your results may not be correct.
6 November 2009 9Upgrading Your Geant4 Release J. Perl
Items for Migration of the User CodeItems for Migration of the User Code For a Minor release, there will not be much hereFor a Minor release, there will not be much here
For a Major release, pay careful attention to this sectionFor a Major release, pay careful attention to this section
6 November 2009 10Upgrading Your Geant4 Release J. Perl
Expected effects on physics and performanceExpected effects on physics and performance
This section tells you what to expect in terms of changed This section tells you what to expect in terms of changed results, changed running time and changed memoryresults, changed running time and changed memory
6 November 2009 11Upgrading Your Geant4 Release J. Perl
How to Upgrade (1)How to Upgrade (1)
Check the release notes to see if your existing Platform, Compiler andCLHEP version are still OK
Minor release upgrades generally do not require changes to any of these,but check the notes
Upgrade if need be
If you’ve followed the recommended installation instructions,you will have your user code in a G4WORKDIR that is NOT insideyour Geant4 installation directory
Good: ~/mydir/Geant4/geant4.9.2.p02/... ~/mydir/g4work/myUserCode
Not so Good: ~/mydir/Geant4/geant4.9.2.p02 ~/mydir/Geant4/geant4.9.2.p02/myUserCode
The point of keeping your user code separate from the Geant4 installationis that your user code may work with several different Geant4 versions,and if you decide later to delete a particular Geant4 version,you won’t accidentally delete your user code
6 November 2009 12Upgrading Your Geant4 Release J. Perl
How to Upgrade (2)How to Upgrade (2) Unpack the new Geant4 version
For example, to: ~/mydir/Geant4/geant4.9.3/...
Make sure you do not have any left over G4 environment variables printenv | grep “G4” Get a new session, clean up your .login or .cshrc, or do whatever is necessary
Run ./Configure -build From within the newly unpacked Geant4 release
Run ./Configure From within the newly unpacked Geant4 release
and if your installation required you to run ./Configure -install, re-do that now too
Clean up the old compilation products of your user code Delete the bin, lib and tmp directories from your G4WORKDIR These contain your user code linked against the old Geant4 release You need to remove these so that when you remake your user code
it will be completely remade with the new Geant4 release
Run make From within your user code directory
6 November 2009 13Upgrading Your Geant4 Release J. Perl
In Case of TroubleIn Case of Trouble Did you review the Release Notes?
Did you remember to remove all pre-existing G4 environment variables? Otherwise you may be pointing to some mix of old and new releases
Did you remember to delete the old bin, lib and tmp directories from your G4WORKDIR?
Otherwise you may have part of your code compiled against one Geant4 release and part of your code compiled against another Geant4 release
Check the Geant4 Installation and Configuration Forum http://geant4-hn.slac.stanford.edu:5090/Geant4-HyperNews/indexhttp://geant4-hn.slac.stanford.edu:5090/Geant4-HyperNews/index There’s a very good search function at the top of that page Someone might have had the same issue and the solution might already be there If the problem is something new, post it to the forum