-
Notifications
You must be signed in to change notification settings - Fork 0
g4exa is a visualisation of the Geant4 A01 example done with the softinex tools.
gbarrand/g4exa
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
To build : UNIX> cd <app>/mgr UNIX> ./build # Cocoa version on macOS, X11 on Linux, win32 on a Windows-10/cygwin, Windows-10/WSL. ( UNIX> ./build -v) macOS> ./build -x11 -bin_x11 # to build the X11 version. UNIX> ./build -offscreen -bin_offscreen # to build the pure offscreen version. (here UNIX is for Linux, macOS, Windows-10/cygwin, Windows-10/WSL) To build the WebAssembly (wasm) version : UNIX> <install the emscripten SDK (emsdk)> UNIX> <source setup the emsdk> UNIX> ./build -wasm -bin_wasm If the GNU parallel application is known from your prompt, you can use the "-parallel" option so that C and C++ file compilations are distributed on your cores. This feature had been tested with success on macOS with a MacPorts installation of the GNU parallel program and on centos7 by using the GNU distribution. Since good part of the code of our apps is pure header, it will not boost the "main" part of them, but it clearly boosts the build of the ourex externals, in particular if using some ourex/geant4<versio> one. At end, you should have a distribution file : bin_<config>/distrib/<app>-<version>-<platform>.zip To run : UNIX> cd <app>/mgr the offscreen version : UNIX> ./bin_offscreen/distrib/<app>/<version>/bin/<app> the OSX Cocoa version : macOS> open ./bin_sdk_mac/distrib/<app>/<version>/<app>.app the OSX X11 version : macOS> ./bin_x11/distrib/<app>/<version>/bin/<app> the Linux X11 version : Linux> ./bin_gnu/distrib/<app>/<version>/bin/<app> the Windows version : cygwin> ./bin_visual/distrib/<app>/<version>/bin/<app>.exe For the wasm version displaying within a web browser locally : UNIX> cd ./bin_wasm/distrib/<app>/<version> UNIX> <source setup the emsdk> UNIX> emrun --no_browser --hostname 0.0.0.0 --port 8080 . and then open a page with 0.0.0.0:8080 into a web browser supporting WebAssembly and WebGL. See the <app> section on https://gbarrand.github.io for more. /////////////////////////////////////////////////////////////////////////////////////////////////////// /// For apps related to geant4 (g4exa, g4view, MEMPHYS, MEMPHYS_vis) : //////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////// The packing comes with a inexlib/ourex/geant4<version> in sync with the code of the app, and the build can proceed by using the upper commands, but you may want to build the app by using an already installed geant4. As our distribution packing (done with bush/app_distrib) does not handle (yet) shared libraries, you must have a geant4 built with archive libs (<geant4_install_dir>/[lib,lib64]/libG4FR.a, etc...). If not, a below "build -sys_geant4" will stop. (The check for geant4 archives is done by bush/use/geant4<version>). We remember that to have archive libraries for geant4, you have to build it with the cmake option "-DBUILD_STATIC_LIBS=ON" (and "-DBUILD_SHARED_LIBS=ON" to have also shared libs). The to build the app distribution : UNIX> cd <app>/mgr sh> . <geant4_install_dir>/bin/geant4.sh ( csh> source <geant4_install_dir>/bin/geant4.csh ) UNIX> geant4-config # to test that this program is here. Linux> <if needed source setup a gcc_[version].[sh,csh] file to have the correct g++> ( csh> source gcc_493.csh # on Lund iridium ) UNIX> ./build -sys_geant4 # -sys_geant4 to use the geant4 pointed by geant4-config. ( UNIX> ./build -sys_geant4 -v # to see built files.) ( UNIX> ./build -sys_geant4 -x # for a full trace.) Darwin> ./build -sys_geant4 -x11 -bin_x11 # to build the X11 version on macOS. At end, you should have a distribution file : bin_<config>/distrib/<app>-<version>-<platform>.zip WARNING, WARNING, WARNING, WARNING, WARNING, WARNING, WARNING, WARNING, WARNING : If running from the build area by having done the "source geant4 setup", be sure that the environment variables : G4NEUTRONHPDATA, G4LEDATA, G4LEVELGAMMADATA, G4ENSDFSTATEDATA, G4SAIDXSDATA points to valid Geant4 data directories. If not, you are going to have crashes at startup. The best, if building by using an installed geant4 (a "sys_geant4"), is to run the app from a brand new shell.
About
g4exa is a visualisation of the Geant4 A01 example done with the softinex tools.
Resources
Stars
Watchers
Forks
Packages 0
No packages published