On 9/10/23 10:28 PM, PJ wrote:
> I am a PhD student. I have an experience with GEANT4 and can run it on
> the supercomputer.
If, by chance, you want to run G4beamline 3.08 on
perlmutter.nersc.gov,
it is already built there, with MPI enabled. Email me for details.
> > However, I am currently trying to run G4beamline on a server but am
> getting stuck with how to execute my work. the OS is CentOS7. So, I
> installed G4beamline-3.06 from the source code, by using these command
>
> $ cd G4beamline-3.06-source
OK. But I suggest using G4beamline 3.08 -- it has some bug fixes and an
updated Geant4.
On CentOS7 you do not need to build G4beamline from source, the file
G4beamline-3.06-SLF64.tgz that you downloaded should work. Just un-tar
it, add its bin directory into your PATH, and use 'g4bl' or 'g4blgui'.
Pursuing building from source:
> $ cp g4bl/CMakelists.txt g4bl/CMakeLists.txt
> $ cp g4bldata/CMakelists.txt g4bldata/CMakeLists.txt
> $ cp g4blgui/CMakelists.txt g4blgui/CMakeLists.txt
> $ cp g4blmpi/CMakelists.txt g4blmpi/CMakeLists.txt
> $ cp g4bltest/CMakelists.txt g4bltest/CMakeLists.txt
All of those do nothing, and are not needed. Please follow the
instructions in doc/BUILD.txt.
> $ mkdir build ; cd build
> $ cmake -DCMAKE_INSTALL_PREFIX=$HOME/local/G4beamline-3.06
> -DG4BL_VISUAL=ON -DG4BL_GUI=ON -DG4BL_ROOT=ON -DG4BL_GSL=ON -D
> G4BL_FFTW=ON -DG4BL_MPI=OFF
> -DCMAKE_PREFIX_PATH=/home/r21234/OSS/geant4.10.06.p01/build ..
*** YOU HAVE CONFLICTING PREFIX PATHS. Note the G4beamline Cmake files
expect the Geant4 install directory to be in GEANT4_DIR. Presumably you
have already setup the library environment variables, or your build
would fail.
Start over:
$ cd G4beamline-3.06-source
$ rm -fr build
$ mkdir build; cd build
$ cmake -DCMAKE_INSTALL_PREFIX=$HOME/local/G4beamline-3.06
-DG4BL_VISUAL=ON -DG4BL_GUI=ON -DG4BL_ROOT=ON -DG4BL_GSL=ON -D
G4BL_FFTW=ON -DG4BL_MPI=OFF ..
$ make 2>&1 | tee make.log
$ make install 2>&1 | tee make_install.log
> Then I got G4beamline-3.06-SLF64.tgz at my home directory (/home/username)
That file was not built by the above commands. I suspect you downloaded
it -- creation time should tell.
> my question is Where should I put input file?
myjop.in and How to
> execute it ??
> How to run?? What is command ?? g4bl
myjob.in ???
Put your input file wherever is most convenient for you. I invariably
put mine in a directory related to the project I am working on.
After the above build, do this:
$ source $HOME/local/G4beamline-3.06/bin/g4bl-setup.sh
$ # perhaps put that into your .profile
then to use the GUI:
$ g4blgui &
To use the command-line:
$ cd <wherever
myjob.in is located>
$ g4bl
myjob.in
$ # that puts the output files into the current directory
Tom Roberts