Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

No Format
./bin/Linux-g++/slic [options]

What command-line options does SLIC support?

How do I get help on the command-line syntax?

...

This will print slic usage and exit.

How do I find out about the SLIC version I am running?

The command

No Format
slic -v

prints the SLIC version, along with a lot of other information (probably too much).

How do I find out detailed information about the SLIC version I am running?

SLIC prints a splash screen as it starts up with the version, build date, and other information.

What command-line options does SLIC support?

Typing slic -h will print the available command-line options.

No Format

******
No Format

******************
* Command Line Options *
*****************************************
 App  

Option  Full Name   : Simulator for the LinearMin ColliderArgs (SLIC)
 VersionMax :Args v1r13p6
 DateMacro Command   : Tue Apr  4 17:32:07 PDT 2006
 Authors : Jeremy McCormick and Ron Cassell
 Inst    : SLAC
 WWW     : http://www.lcsim.org/software/slic
 Contact : jeremym@slac.stanford.edu
*************************************************************

How do I find out the version of Geant4 that SLIC was built with?

The Geant4 toolkit prints a splash screen that SLIC displays when it starts up.

No Format

*************************************************************
 Geant4 version Name: geant4-08-00-patch-01    (10-February-2006)
 Description
---------------------------------------------------------------------------------------------------------------------------
-h      --help          0         0         /slic/usage             Print SLIC usage.
-n      --interactive   0         0         /control/interactive    Start Copyrighta :Geant4 Geant4interactive Collaborationsession.
-v      --version       0         0 Reference   : NIM A 506 (2003), 250-303
 /slic/version           Print SLIC version.
-m      --macro         WWW1 : http://cern.ch/geant4
*************************************************************

The Geant4 version in the figure above is 8.0.p01.

How do I get help on SLIC's custom Geant4 commands?

SLIC commands are added into various directories within the Geant4 UI hierarchy. From interactive mode, use this command to print information on a SLIC or LCDD command.

No Format

help [command]

Those directories containing only SLIC or LCDD commands are marked with SLIC or LCDD.

No Format

/lcio/   LCIO output commands. [SLIC]

Type

No Format
help [dir]

or

No Format
help [command]

for information about the user interface directory or command. Of course, this requires that the programmer actually put in some useful help string. Most commands and directories have such information.

How do I run a macro containing UI commands?

You can put Geant4 UI commands into one or more macro files that slic can execute. This is done with the "-m" switch. There can be any number of these switches given to slic at the commandline. For instance, this command will execute the two macros init.mac and run.mac.

No Format

slic -m init.mac -m run.mac

The macros are executed in the order given at the command-line.

If macros are interspersed throughout the command switches, then SLIC will also execute each command in order.

No Format

slic -m init.mac -x -o output -p myDir -m run.mac

First init.mac will be executed. Then the three commands corresonding to the "-xop" switches and finally run.mac presumably executes the /run/beamOn command.

How do I run in interactive mode?

SLIC can be started in interactive mode using the -n option or the /control/interactive UI command.

This command will start Geant4 in PreInit mode where the geometry is not loaded.

No Format

slic -n

Other commands may also be executed before the interactive mode starts.

No Format

slic -g myGeom.lcdd -n

The LCDD file will be constructed, so the simulator will start in Idle mode.

What is a typical command to run SLIC in batch mode?

The following command illustrates some of the options that could be used in a typical batch run.

No Format

slic -g myGeom.lcdd \          1         /control/execute        Execute Geant4 commands from a file.
-g      --lcdd-url      1         1         /lcdd/url               Set LCDD geometry file URL.
-i      --event-file    1         1         /generator/filename     Set event input file full path.
-o      --lcio-file     1         1         /lcio/filename          Set name of LCIO output file.
-p      --lcio-path     1         1         /lcio/path              Set directory for LCIO output.
-O      --autoname      0         1         /lcio/autoname          Automatically name the LCIO output file.
-x      --lcio-delete   0         0         /lcio/fileExists delete Delete an existing LCIO file.
-r      --run-events    1         1         /run/beamOn   # geometry file
     -i events.stdhep \   Run # of events.
-s      #--skip-events StdHep input file
1     -p lcio/ \  1         /generator/skipEvents   Set number of events to skip.
-l # path for LCIO output file
 --physics-list  1   -o output.slcio \    1         #/physics/select name of LCIO output file
     -xSet \Geant4 physics list.
-L      --log-file      0         0   # delete existing LCIO file
      /log/filename           Set logfile name.
-d      -r-seed   1234 \      0         1      #   /random/seed the random engine
     -s 100 \                      # number of events to skip
     -r 1000                       # number of events to run

How can I check on the progress of my SLIC job(s)?

In bash, direct all output to a file, as follows.

No Format

slic &> job.log &

Now use the tail command to look at the output file as the job progresses.

No Format

tail -f job.log

The BeginEvent and EndEvent markers are the best indicators of the job's progress.

            Set the random seed.  (No argument seeds with time.)

Each option is mapped in a straightforward way to a corresponding Geant4 UI command, so the same exact commands can be executed either from the command prompt or in the Geant4 interactive terminal.

How do I find out about the SLIC version I am running?

The command

No Format
slic -v

prints the SLIC version, along with a lot of other information (probably too much).

No Format

Simulator for the Linear Collider; SLIC; v1r13p6; Jeremy McCormick and Ron Cassell; SLAC; Tue Apr  4 17:32:07 PDT 2006

The /slic/version command will do the same from a macro or UI terminal.

How do I get detailed information about the SLIC version I am running?

SLIC prints a splash screen as it starts up with the version, build date, and other information.

No Format

*************************************************************
 App     : Simulator for the Linear Collider (SLIC)
 Version : v1r13p6
 Date    : Tue Apr  4 17:32:07 PDT 2006
 Authors : Jeremy McCormick and Ron Cassell
 Inst    : SLAC
 WWW     : http://www.lcsim.org/software/slic
 Contact : jeremym@slac.stanford.edu
*************************************************************

How do I find out the version of Geant4 that SLIC was built with?

The Geant4 toolkit prints a splash screen that SLIC displays when it starts up.

No Format

*************************************************************
 Geant4 version Name: geant4-08-00-patch-01    (10-February-2006)
                      Copyright : Geant4 Collaboration
                      Reference : NIM A 506 (2003), 250-303
                            WWW : http://cern.ch/geant4
*************************************************************

The Geant4 version in the figure above is 8.0.p01.

How do I get help on SLIC's custom Geant4 commands?

SLIC commands are added into various directories within the Geant4 UI hierarchy. From interactive mode, use this command to print information on a SLIC or LCDD command.

No Format

help [command]

Those directories containing only SLIC or LCDD commands are marked with SLIC or LCDD.

No Format

/lcio/   LCIO output commands. [SLIC]

Type

No Format
help [dir]

or

No Format
help [command]

for information about the user interface directory or command. Of course, this requires that the programmer actually put in some useful help string. Most commands and directories have such information.

How do I run a macro containing UI commands?

You can put Geant4 UI commands into one or more macro files that slic can execute. This is done with the "-m" switch. There can be any number of these switches given to slic at the commandline. For instance, this command will execute the two macros init.mac and run.mac.

No Format

slic -m init.mac -m run.mac

The macros are executed in the order given at the command-line.

If macros are interspersed throughout the command switches, then SLIC will also execute each command in order.

No Format

slic -m init.mac -x -o output -p myDir -m run.mac

First init.mac will be executed. Then the three commands corresonding to the "-xop" switches and finally run.mac presumably executes the /run/beamOn command.

How do I run in interactive mode?

SLIC can be started in interactive mode using the -n option or the /control/interactive UI command.

This command will start Geant4 in PreInit mode where the geometry is not loaded.

No Format

slic -n

Other commands may also be executed before the interactive mode starts.

No Format

slic -g myGeom.lcdd -n

The LCDD file will be constructed, so the simulator will start in Idle mode.

What is a typical command to run SLIC in batch mode?

The following command illustrates some of the options that could be used in a typical batch run.

No Format

slic -g myGeom.lcdd \              # geometry file
     -i events.stdhep \            # StdHep input file
     -p lcio/ \                    # path for LCIO output file
     -o output.slcio \             # name of LCIO output file
     -x \                          # delete existing LCIO file
     -r 1234 \                     # seed the random engine
     -s 100 \                      # number of events to skip
     -r 1000                       # number of events to run

How can I check on the progress of my SLIC job(s)?

In bash, direct all output to a file, as follows.

No Format

slic &> job.log &

Now use the tail command to look at the output file as the job progresses.

No Format

tail -f job.log

The BeginEvent and EndEvent markers are the best indicators of the job's progress.

Most batch systems will provide logging services, and the tail command can be used on these files, too.

How do I run SLIC on the LSF batch system?

The bsub command is used to run SLIC on LSF.

This is an example of submitting a job to run 1000 events through the sid00 detector on the xlong batch queue.

No Format

bsub -q xlong -o `pwd`/job.log -e `pwd`/err.log time slic -g sid00.lcdd -i events.stdhep -o events_sid00 -r 1000

LSF accepts plain bash scripts to start jobs. Mine usually use a few for loops to run combinations of geometries with StdHep files.

No Format

for g in $(ls *.lcdd); do
  for s in $(ls stdhep/*.stdhep); do
    fname=$(basename ${s%.*})_$(basename ${g%.*})
    bsub -o `pwd`/$fname.log -e `pwd`/$fname.err -q xlong time slic -g $g -i $i -o $fname
  done
done 

The stdhep directory should contain a symlink to the StdHep files used for input events.

Example LSF submission scripts can be found in Jeremy McCormick's jobs directory on the SLAC Linux machines at ~jeremym/work/jobsMost batch systems will provide logging services, and the tail command can be used on these files, too.

How do I run SLIC on the

...

Condor batch system?

...

TODO: An old version works on Condor but probably not SimDist. I will get this running at NICADD.

Can I run SLIC on the Grid?

No. But I am working on it.

Why not?

Because getting things to run on the Grid is hard.

How can I make SLIC look for XML schemas in a local directory?

The current directory is always searched for the XSD files, first.

The GDML_SCHEMA_DIR environment variable may point to a single directory where all XSD files should be located. LCDD uses GDML for entity resolution, also, so the LCDD schemas can be placed in this directory, also.

How do I install the XML schemas to a local directory?

How can I automatically set the name of the LCIO file?

The -O switch turns on SLIC's auto-naming feature, which will give the output file a reasonable name based on the event generator used and the name (or tag) of the geometry. The /lcio/autoname command is the corresponding UI command.

How can I customize SLIC's autonaming feature?

The autoname feature can be customized by providing arguments to the /lcio/autoname command. These specify fields that should be inserted in the automatically generated filename.

Here is a summary of these options.

field

description

binary

basename of the slic binary

application

the string 'SLIC'

version

SLIC's version string from VERSION

geometry

geometry tag from the LCDD header

date

current date

event

description of the current event from the generator

eventNumber

number of events

run

run number

The following command illustrates the autoname feature.

No Format

/lcio/autoname event application version geometry

It would result in an automatically-generated name similar to neutrons_SLIC_v1r13p6_myGeometry.

How can I automatically delete an existing LCIO file?

The -x option or /lcio/fileExists delete option will cause an existing LCIO file to be overwritten.

How do I skip events in a StdHep file?

The -s option or /generator/skipEvents command take the number of events to skip as an argument. This is only applicable to file-based event sources such as StdHep or LCIO files.

How do I set the random seed?

The -r option or the /random/seed command controls the CLHEP random seed setting. Without an argument, the current time is used as a seed. Otherwise, an integer argument is used as the seed.

The bsub command is used to run SLIC on LSF.

This is an example of submitting a job to run 1000 events through the sid00 detector on the xlong batch queue.

No Format

bsub -q xlong -o `pwd`/job.log -e `pwd`/err.log time slic -g sid00.lcdd -i events.stdhep -o events_sid00 -r 1000

LSF accepts plain bash scripts to start jobs. Mine usually use a few for loops to run combinations of geometries with StdHep files.

No Format

for g in $(ls *.lcdd); do
  for s in $(ls stdhep/*.stdhep); do
    fname=$(basename ${s%.*})_$(basename ${g%.*})
    bsub -o `pwd`/$fname.log -e `pwd`/$fname.err -q xlong time slic -g $g -i $i -o $fname
  done
done 

The stdhep directory should contain a symlink to the StdHep files used for input events.

Example LSF submission scripts can be found in Jeremy McCormick's jobs directory on the SLAC Linux machines at ~jeremym/work/jobs.

How do I run SLIC on the Condor batch system?

TODO: An old version works on Condor but probably not SimDist. I will get this running at NICADD.

Can I run SLIC on the Grid?

No. But I am working on it.

Why not?

Because getting things to run on the Grid is hard.

How can I make SLIC look for XML schemas in a local directory?

The current directory is always searched for the XSD files, first.

The GDML_SCHEMA_DIR environment variable may point to a single directory where all XSD files should be located. LCDD uses GDML for entity resolution, also, so the LCDD schemas can be placed in this directory, also.

How do I install the XML schemas to a local directory?

How can I automatically set the name of the LCIO file?

The -O switch turns on SLIC's auto-naming feature, which will give the output file a reasonable name based on the event generator used and the name (or tag) of the geometry. The /lcio/autoname command is the corresponding UI command.

How can I customize SLIC's autonaming feature?

How can I automatically delete an existing LCIO file?

How do I skip events in a StdHep file?

...

How do I dump the state of the CLHEP random engine?

...