Closed rahmans1 closed 3 months ago
What is this command g4-cls G4Cerenkov
supposed to do?
What is this command
g4-cls G4Cerenkov
supposed to do?
It's a command line utility that's supposed to show the class description. May be they are not activated by default since they fall under the category of foreign externals. https://simoncblyth.bitbucket.io/opticks/docs/externals.html
Do I understand correctly that G4Cerenkov
is a Geant4 class? If so, here is the reference API https://geant4.kek.jp/Reference/11.1.2/classG4Cerenkov.html
It appears to me that g4-cls
is broken because geant4 is not installed in /usr/local/opticks_externals
$ g4-cls
bash: cd: /usr/local/opticks_externals/g4_1042.build/geant4.10.04.p02/: No such file or directory
/home/dmitri
find: 'source': No such file or directory
find: 'source': No such file or directory
find: 'source': No such file or directory
find: 'source': No such file or directory
find: 'source': No such file or directory
vi -R
bash: vi: command not found
Geant4 is installed via Spack:
$ spack find -p geant4
-- linux-ubuntu22.04-sapphirerapids / gcc@11.4.0 ----------------
geant4@11.1.2 /opt/spack/opt/spack/linux-ubuntu22.04-sapphirerapids/gcc-11.4.0/geant4-11.1.2-z4zrvgbct5pf2uhyrxf7xlo5mjalfiwf
==> 1 installed package
Do I understand correctly that
G4Cerenkov
is a Geant4 class? If so, here is the reference API https://geant4.kek.jp/Reference/11.1.2/classG4Cerenkov.htmlIt appears to me that
g4-cls
is broken because geant4 is not installed in /usr/local/opticks_externals$ g4-cls bash: cd: /usr/local/opticks_externals/g4_1042.build/geant4.10.04.p02/: No such file or directory /home/dmitri find: 'source': No such file or directory find: 'source': No such file or directory find: 'source': No such file or directory find: 'source': No such file or directory find: 'source': No such file or directory vi -R bash: vi: command not found
Geant4 is installed via Spack:
$ spack find -p geant4 -- linux-ubuntu22.04-sapphirerapids / gcc@11.4.0 ---------------- geant4@11.1.2 /opt/spack/opt/spack/linux-ubuntu22.04-sapphirerapids/gcc-11.4.0/geant4-11.1.2-z4zrvgbct5pf2uhyrxf7xlo5mjalfiwf ==> 1 installed package
Can opticks link against the geant4 installation that is available through spack?
Yes, that is exactly where opticks finds Geant4 via CMake. In the container we simply don't have another instance of Geant4 besides the one installed with Spack
But it's in the image, right?
But it's in the image, right?
Yes, all the dependencies (including Geant4) opticks is compiled against are in the image.
@plexoos Is there a work around for the bash utilities to work without geant4 being present in the externals folder?
I don't think there is an easy workaround to make commands from g4.bash
work as some of them expect the Geant's source directory. Currently, we don't keep the source files, but this default Spack's behavior can be changed.
I don't think there is an easy workaround to make commands from
g4.bash
work as some of them expect the Geant's source directory. Currently, we don't keep the source files, but this default Spack's behavior can be changed.
In that case, I don't think this is a priority for us. We would just make a disclaimer that those external utilities don't work within esi-shell.
The size of the G4 source is trivial. What's not trivial is scripting to add this... Doable, but as Sakib said probably not a priority.
To summarize, the issue is about a feature in opticks to reference Geant4 classes (and related documentation). Since we don't have plans to support opticks, the users can use the official Geant4 documentation available elsewhere.
Steps to reproduce the issue:
Then use test a bash utility from opticks
Error Message
Probable cause
The utility is inside the externals folder and sets the paths through shell commands.