I want to know that can we run a particular example in multi threading mode ?
if yes, how it can be done for a particular example like B1 ?
since i have installed Geant4 without multi threading so how can i do that.
Thanks in advance!
Priyanshu
yes, i did this, but it is not running in multi threading mode after giving this lines of code.
so do i need to change something in installation because by doing so it is only running as same as it runs in single thread . i can’t see those threads as it shows when it runs in multi threading mode.
I tried it for the basics example B1 and i made all the changes in action initialization by writing build for master and also included header files.
also i was running this in batch mode , with run1.mac file where i mentioned all the commands needed for multi threading but till now it is not running in multi threading mode.
is there anything that i have to switch on before running the example ?
can you please help me with this.
Thanks in advance !
Priyanshu
Okay.
in the same installation, can i reinstall it with multi threading or should i have to delete the first one and install Geant4 again with multi threading ?
If the directory in which you ran cmake, then make and make install is still present on the system, then you can go into that and run
$ cmake -DGEANT4_BUILD_MULTITHREADED=ON .
$ make && make install
and it will recompile and re-install. If that original build directory isn’t present then yes, you’ll need to delete the existing install and re-build/install from scratch.
one more question , if i do so then will i be able to run the same code in single thread (if i wish to or my code is not thread safe) after changing this installation to multi thread mode.
Thanks
Priyanshu
Hi,
when i am changing the installation for multi-threading then it is giving me this error. i am not getting this why this error is occurring attached image.
can you please help me with this. how can i resolve this issue.
Thanks
Priyanshu
Is the file it’s saying isn’t there: /usr/lib/x86_64-linux-gnu/libGL.so actually present on the system? It might be necessary to reinstall the packages providing that file and Qt5.
It looks like this is an Ubuntu system, and for this there’s a good site that can help locate software packages, or to see which file(s) a package provides: https://packages.ubuntu.com
means this is not the Geant4 installation problem or cmake problem. this is the Ubuntu problem. because when i am doing installation for multi-threading in my laptop , it is working fine but in the lab workstation (that has more processors) it is giving this kind of error. since i want to run my simulation for more number of events.
actually this same problem was occurring at the time of installation of Geant4 but on trying installation 3-4 times , finally it installed. now it is giving the same error for multi-threading.
sure, i can try it tomorrow. and will let you know.
Thanks
Priyanshu
no, not at all.
in workstation , Geant4 is already installed.
in workstation i am trying to make it multi-threading compatible.
===========================================
in my laptop , i have already multi-threading mode on but it is hanging for 10k primaries in one event so i can’t run this simulation in my laptop.
but when using one primary with 10k events it is working fine in my laptop.
Whilst it’s annoying, I would suggest the best course of action is to delete the existing build directory for Geant4, remove the existing installs of it, and rebuild/install from scratch. It’s unfortunately impossible to diagnose from the above whether this is a build config issue or something amiss on these systems. Completely fresh builds/installs will be able, hopefully, to resolve that if needed.