Home Online Manual
Top
Back: Editing input
Forward: Startup sequence
FastBack: General concepts
FastForward: Emacs user interface
Up: Interactive use
Top: Singular Manual
Contents: Table of Contents
Index: Index
About: About this document

3.1.6 Command line options

The startup syntax is

 
Singular  [options] [file1 [file2 ...]]
ESingular  [options] [file1 [file2 ...]]
Options can be given in both their long and short format. The following options control the general behaviour of SINGULAR:
-d, --sdb
Enable the use of the source code debugger. See Source code debugger.

-e, --echo[=VAL]
Set value of variable echo to VAL (integer in the range 0, ..., 9). Without an argument, echo is set to 1, which echoes all input coming from a file. By default, the value of echo is 0. See echo.

-h, --help
Print a one-line description of each command line option and exit.

--allow-net
Allow the help browsers based on a web browser to fetch HTML manual pages over the net from the WWW home-site of SINGULAR. See The online help system, for more info.

--browser="VAL"
Use VAL as browser for the SINGULAR online manual.
VAL may be one of the browsers mentioned in LIB/help.cnf, for example html (Windows only), mozilla, firefox, konqueror, galeon, netscape, safari (OsX only), xinfo, tkinfo, info, builtin, or emacs. Depending on your platform and local installation, only some browsers might be available. The default browser is html for Windows and one based on a web browser for Unix platforms. See The online help system, for more info.

--no-rc
Do not execute the .singularrc file on start-up. By default, this file is executed on start-up. See Startup sequence.

--no-stdlib
Do not load the library standard.lib on start-up. By default, this library is loaded on start-up. See Startup sequence.

--no-warn
Do not display warning messages.

--no-out
Suppress display of all output.

--no-shell
Runs Singular in restricted mode to disallow shell escape commands. Objects of type link will also be unable to use.

-t, --no-tty
Do not redefine the characteristics of the terminal. This option should be used for batch processes.

-q, --quiet
Do not print the start-up banner and messages when loading libraries. Furthermore, redirect stderr (all error messages) to stdout (normal output channel). This option should be used if SINGULAR's output is redirected to a file.

-v
Print extended information about the version and configuration of SINGULAR (used optional parts, compilation date, start of random generator etc.). This information should be included if a user reports an error to the authors.
It also list all the used directories/files (see Used environment variables).

The following command line options allow manipulations of the timer and the pseudo random generator and enable the passing of commands and strings to SINGULAR:

-c, --execute=STRING
Execute STRING as (a sequence of) SINGULAR commands on start-up after the .singularrc file is executed, but prior to executing the files given on the command line. E.g., Singular -c "help all.lib; quit;" shows the help for the library all.lib and exits.

-u, --user-option=STRING
Returns STRING on system("--user-option"). This is useful for passing arbitrary arguments from the command line to the SINGULAR interpreter. E.g.,
Singular -u "xxx.dump" -c 'getdump(system("--user-option"))' reads the file xxx.dump at start-up and allows the user to start working with all the objects defined in a previous session.

-r, --random=SEED
Seed (i.e., set the initial value of) the pseudo random generator with integer SEED. If this option is not given, then the random generator is seeded with a time-based SEED (the number of seconds since January, 1, 1970, on Unix-like operating systems, to be precise).

--min-time=SECS
If the timer (see timer), resp. rtimer (see rtimer) , variable is set, report only times larger than SECS seconds (SECS needs to be a floating point number greater than 0). By default, this value is set to 0.5 (i.e., half a second). E.g., the option --min-time=0.01 forces SINGULAR to report all times larger than 1/100 of a second.

--ticks-per-sec=TICKS
Set unit of timer to TICKS ticks per second (i.e., the value reported by the timer and rtimer variable divided by TICKS gives the time in seconds). By default, this value is 1.

--cpus=CPUs
set the maximal number of CPUs to use.

--cntrlc=C
set the default answer for interrupt signals to C which should be a for abort, c for continue or q for quit.

The next three options are of interest for the use with ssi links:

-b, --batch
Run in batch mode. Opens a TCP/IP connection with host specified by --MPhost at the port specified by --MPport. Input is read from and output is written to this connection in the format given by --link. See Ssi links.

--MPport=PORT
Use PORT as default port number for connections (whenever not further specified). This option is mandatory when the --batch option is given. See Ssi links.

--MPhost=HOST
Use HOST as default host for connections (whenever not further specified). This option is mandatory when the --batch option is given. See Ssi links.

Finally, the following options are only available when running ESingular (see Running SINGULAR under Emacs for details).

--emacs=EMACS
Use EMACS as Emacs program to run the SINGULAR Emacs interface, where EMACS may e.g. be emacs or xemacs.

--emacs-dir=DIR
Set the singular-emacs-home-directory, which is the directory where singular.el can be found, to DIR.

--emacs-load=FILE
Load FILE on Emacs start-up, instead of the default load file.

--singular=PROG
Start PROG as SINGULAR program within Emacs

The value of options given to SINGULAR (resp. their default values, if an option was not given), can be checked with the command system("--long_option_name"). See system.

 
  system("--quiet");    // if ``quiet'' 1, otherwise 0
==> 1
  system("--min-time"); // minimal reported time
==> 0.5
  system("--random");   // seed of the random generator
==> 12345678

Furthermore, the value of options (e.g., --browser) can be re-defined while SINGULAR is running using the command system("--long_option_name_string ",expression). See system.

 
  system("--browser", "builtin");  // sets browser to 'builtin'
  system("--ticks-per-sec", 100);  // sets timer resolution to 100