{"id":421,"date":"2018-02-06T09:39:18","date_gmt":"2018-02-06T09:39:18","guid":{"rendered":"http:\/\/ri.itservices.manchester.ac.uk\/htccondor\/?page_id=421"},"modified":"2025-02-21T12:02:42","modified_gmt":"2025-02-21T12:02:42","slug":"geant4","status":"publish","type":"page","link":"https:\/\/ri.itservices.manchester.ac.uk\/htccondor\/software\/geant4\/","title":{"rendered":"Geant4"},"content":{"rendered":"<div class=\"entrytext\"><center><strong>Please note that Geant4 10.05 is only currently available via the virtual HTCondor submit node<br \/>\nvm-submitter.itservices.manchester.ac.uk<\/strong><\/center><\/p>\n<h2><span id=\"Overview\">Overview<\/span><\/h2>\n<p>Geant 4 is a toolkit for the simulation of the passage of particles through matter developed at <a href=\"http:\/\/geant4.cern.ch\/\">CERN<\/a>. Its areas of application include high energy, nuclear and accelerator physics, as well as studies in medical and space science.<\/p>\n<h2>Restrictions on use\/License information<\/h2>\n<p>Geant 4 is <em>free software<\/em> as defined by the terms of the <a href=\"http:\/\/geant4.web.cern.ch\/license\">Geant4 software license<\/a>.<\/p>\n<p>There is no restriction on the number of simultaneously running programs on HTCondor.<\/p>\n<p>You can see which nodes have which GEANT4 versions available via:<\/p>\n<pre>\r\nsubmitter ~]$ condor_status -long | grep GEANT\r\n<\/pre>\n<h2><span id=\"Versions_installed\">Versions installed<\/span><\/h2>\n<table border=\"1\" align=\"center\">\n<tbody>\n<tr>\n<th align=\"center\">Geant4 version<\/th>\n<th align=\"center\">HTCondor ClassAd<\/th>\n<\/tr>\n<tr>\n<td align=\"center\">10.06<\/td>\n<td align=\"center\">HAS_GEANT4_10_6<\/td>\n<\/tr>\n<tr>\n<td align=\"center\">10.05<\/td>\n<td align=\"center\">HAS_GEANT4_10_5<\/td>\n<\/tr>\n<tr>\n<td align=\"center\">10.04<\/td>\n<td align=\"center\">HAS_GEANT4_10_4S<\/td>\n<\/tr>\n<tr>\n<td align=\"center\">10.02<\/td>\n<td align=\"center\">HAS_GEANT4_10_2<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2><span id=\"Set_up_procedure_on_submit_node\">Set up procedure on submit node<\/span><\/h2>\n<p>To access the software you must first run the commands:<\/p>\n<pre>module load gcc\/6.4.0\r\nmodule load geant4\/&lt;Geant4 version&gt;\r\n<\/pre>\n<h2><span id=\"Running_the_application\">Running the application<\/span><\/h2>\n<p>In order to run Geant4 jobs on HTCondor, it is first necessary to compile the Geant4 code on the HTCondor submit node. This is because the version of Geant4 deployed has been compiled using version 6.4.0 of the GNU Compiler suite.<\/p>\n<p><strong>Step 1 \u2013 Compiling your Geant4 code<\/strong><\/p>\n<p>Geant4 requires its executable codes be built in a separate folder from the program source code. Assuming that the source code is in <tt>&lt;source folder&gt;<\/tt> then from a linux terminal prompt, run the following commands from inside your <tt>&lt;build folder&gt;<\/tt>:<\/p>\n<pre>cmake -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ &lt;source folder&gt;\r\nmake\r\n<\/pre>\n<p>where<\/p>\n<ul>\n<li><strong>-DCMAKE_C_COMPILER=gcc<\/strong> specifies that <tt>cmake<\/tt> should use the GNU compiler on the current path (and not the default <tt>\/usr\/bin\/cc<\/tt>).<\/li>\n<li><strong>-DCMAKE_CXX_COMPILER=g++<\/strong> specifies that <tt>cmake<\/tt> should use the GNU C++ compiler on the current path (and not the default <tt>\/usr\/bin\/c++<\/tt>).<\/li>\n<li><strong>&lt;source folder&gt;<\/strong> is the location of the folder containing the program source code.<\/li>\n<\/ul>\n<p><strong>Step 2 \u2013 Submitting your job to run on HTCondor<\/strong><\/p>\n<p>It is necessary to submit your Geant4 executable using a <a href=\"https:\/\/ri.itservices.manchester.ac.uk\/htccondor\/wp-content\/uploads\/run_geant4.sh\">wrapper script<\/a> that configures various Geant4 environment variables. This wrapper script should work with all Geant4 codes. The following lines are the contents of a simple generic HTCondor submit text file for a Geant4 job:<\/p>\n<pre>Universe = vanilla\r\n\r\nRequirements = (Target.Opsys == \"LINUX\" &amp;&amp; Target.Arch == \"X86_64\" &amp;&amp; &lt;HTCondor ClassAd&gt;=?=True)\r\nRequest_Memory = 1000\r\n\r\nLog = geant4.log\r\nOutput = geant4.out\r\nError = geant4.error\r\nNotification = Error\r\n\r\nShould_Transfer_Files = Yes\r\nWhen_To_Transfer_Output = On_Exit\r\n\r\nEnvironment = LD_LIBRARY_PATH=\/opt\/gcc-6.4.0\/lib64\r\nExecutable = &lt;wrapper_script&gt;.sh\r\nTransfer_Executable = True\r\nArguments = &lt;Geant4 executable&gt; &lt;input file(s)&gt;\r\nTransfer_Input_Files = &lt;Geant4 executable&gt;,&lt;input file(s)&gt;\r\n\r\nQueue\r\n<\/pre>\n<p>If your submit file is called <tt>submit.txt<\/tt> then your job can be submitted to HTCondor using the command <tt>condor_submit submit.txt<\/tt>.<\/p>\n<h2>Sample Geant4 HTCondor job(s)<\/h2>\n<ol>\n<li><a href=\"https:\/\/ri.itservices.manchester.ac.uk\/htccondor\/software\/Geant4-basic-B1\/\">HTCondor files for Geant4 basic example B1<\/a><\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Please note that Geant4 10.05 is only currently available via the virtual HTCondor submit node vm-submitter.itservices.manchester.ac.uk Overview Geant 4 is a toolkit for the simulation of the passage of particles through matter developed at CERN. Its areas of application include high energy, nuclear and accelerator physics, as well as studies in medical and space science. Restrictions on use\/License information Geant 4 is free software as defined by the terms of the Geant4 software license. There.. <a href=\"https:\/\/ri.itservices.manchester.ac.uk\/htccondor\/software\/geant4\/\">Read more &raquo;<\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"parent":17,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-421","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/ri.itservices.manchester.ac.uk\/htccondor\/wp-json\/wp\/v2\/pages\/421","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ri.itservices.manchester.ac.uk\/htccondor\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/ri.itservices.manchester.ac.uk\/htccondor\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/ri.itservices.manchester.ac.uk\/htccondor\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/ri.itservices.manchester.ac.uk\/htccondor\/wp-json\/wp\/v2\/comments?post=421"}],"version-history":[{"count":20,"href":"https:\/\/ri.itservices.manchester.ac.uk\/htccondor\/wp-json\/wp\/v2\/pages\/421\/revisions"}],"predecessor-version":[{"id":1237,"href":"https:\/\/ri.itservices.manchester.ac.uk\/htccondor\/wp-json\/wp\/v2\/pages\/421\/revisions\/1237"}],"up":[{"embeddable":true,"href":"https:\/\/ri.itservices.manchester.ac.uk\/htccondor\/wp-json\/wp\/v2\/pages\/17"}],"wp:attachment":[{"href":"https:\/\/ri.itservices.manchester.ac.uk\/htccondor\/wp-json\/wp\/v2\/media?parent=421"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}