Geant4 Version: 11.2.0
Operating System: Ubuntu 22.04 on WSL2
Compiler/Version: gcc 11.4.0
CMake Version: cmake 3.22.1
I would like to run a Geant4 app that I can use to get a feel for what performance can be achieved on the computer it is running on. To that end, I found the g4bench (for geant4 < 11.0.0), and g4bench2 (for geant4 ≥ 11.0.0) projects. I downloaded it and tried to build it. I ran into an error that it could not find G4tasking though I did compile Geant4 with the multi-threading feature turned on. I must have done something silly like point the compiler to a wrong directory. Though, if so, I am not sure where or what location would be correct. Please advise.
# Download the source code for the G4Bench2 application
user@machine:~$ cd downloads
user@machine:~/downloads$ git clone --depth=1 https://github.com/koichi-murakami/g4bench2.git
user@machine:~/downloads$ cd g4bench2
user@machine:~/downloads/g4bench2$ mkdir build
user@machine:~/downloads/g4bench2$ mkdir install
# Configure the build (aka compilation) files
user@machine:~/downloads/g4bench2$ ./configure --prefix=/home/ali/downloads/g4bench2/install --with-geant4-dir=/usr/local/include/Geant4 --with-build-dir=/home/ali/downloads/g4bench2/build --disable-vis --enable-opt --disable-debug
# make (aka compile) the build files
user@machine:~/downloads/g4bench2$ make
# This is where I got the following message.
# I am awaiting approval for my geant4 forum application so I can ask about advise to proceed.
# I am sure it is something simple/stupid on my part.
[ 2%] Building CXX object ecal/CMakeFiles/ecal.dir/appbuilder.cc.o
[ 4%] Building CXX object ecal/CMakeFiles/ecal.dir/ecalgeom.cc.o
[ 7%] Building CXX object ecal/CMakeFiles/ecal.dir/main.cc.o
[ 9%] Building CXX object ecal/CMakeFiles/ecal.dir/__/common/calscorer.cc.o
[ 12%] Building CXX object ecal/CMakeFiles/ecal.dir/__/common/eventaction.cc.o
[ 14%] Building CXX object ecal/CMakeFiles/ecal.dir/__/common/g4environment.cc.o
[ 17%] Building CXX object ecal/CMakeFiles/ecal.dir/__/common/particlegun.cc.o
[ 19%] Building CXX object ecal/CMakeFiles/ecal.dir/__/common/runaction.cc.o
[ 21%] Building CXX object ecal/CMakeFiles/ecal.dir/__/common/stepaction.cc.o
[ 24%] Building CXX object ecal/CMakeFiles/ecal.dir/__/util/jsonparser.cc.o
[ 26%] Building CXX object ecal/CMakeFiles/ecal.dir/__/util/stopwatch.cc.o
[ 29%] Building CXX object ecal/CMakeFiles/ecal.dir/__/util/timehistory.cc.o
[ 31%] Linking CXX executable ecal
/usr/bin/ld: cannot find -lG4tasking: No such file or directory
collect2: error: ld returned 1 exit status
make[2]: *** [ecal/CMakeFiles/ecal.dir/build.make:273: ecal/ecal] Error 1
make[1]: *** [CMakeFiles/Makefile2:152: ecal/CMakeFiles/ecal.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
Here is the output of geant4-config --features
to show the setup options.
Known Features:
staticlibs[no]
multithreading[yes]
smartstack[no]
php_as_hp[no]
clhep[yes]
expat[no]
zlib[yes]
gdml[no]
ptl[yes]
usolids[no]
freetype[no]
hdf5[no]
g3tog4[no]
qt[yes]
qt3d[yes]
motif[no]
raytracer-x11[yes]
opengl-x11[yes]
openinventor[no]
vtk[no]