To enable network connection between backend services and all users frontend, the following firewall rules have to be checked:

  • discovery/heartbeat feature:
    • on backend computers/clusters/…: open 19001-19004 outgoing UDP ports,
    • on frontend computers: open 19001-19004 incoming UDP ports,
    • to check heartbeat is well routed from backend to frontend, you can try to send a short message:
      • from backend, start ‘’ or send a message with netcat: echo -n "hello" | nc -u $frontend_ip 19001
      • from frontend receive message (or regular heartbeats) with netcat: nc -lu 19001 (or socat: socat -u udp-recv:19001 -)
  • data transfer:
    • on backend computers/clusters/…: all incoming (easier, if possible), or one specified in ‘calculator.xml’ TCP port (see below)
    • on frontend computers: open all outgoing (easier, if possible), or one specified in ‘calculator.xml’ TCP port (see below)

Frontend configuration file

The configuration file ‘Funz.conf’ of the frontend is located in the Funz installation path, and may be overloaded with the custom file Funz.conf, located in the user Funz home directory: ‘C:\Documents and Settings\mylogin.Funz\Funz.conf’ on Windows, or ‘/home/mylogin/.Funz/Funz.conf’ in Linux.

The following keys may be changed in these files:

  • Network proxy configuration
    • to define the HTTP proxy host or IP
    • proxy.username=myusername to define the username (if needed) for the proxy access
    • proxy.port=8080 to define the proxy port
    • proxy.domain= to define the proxy domain name (if needed)
    • proxy.password=ABCDEFGHIKL the proxy password associated to the username (this field is stored in a crypted key).
  • Math. engine setup
    • R.server=R://123.456.789:6311 to setup the R server math engine. If this field is provided, it implies that a running Rserve instance is available at the given address & port. Otherwise, a Rserve instance will be automatically started when Funz GUI is launched.
    • R.home=/usr/lib/R to customize the R installation path when using a local R+RServe.
    • R.source=MySource.R to initialize the R sessions started sourcing the given .R file.
    • R.load=MyData.Rdata to initialize the R sessions started loading the given .Rdata file.
    • R.verbose=true to ask for an extended verbosity of the R environment

Backend configuration file

The Funz daemon configuration XML file (‘calculator.xml’) holds:

  • the list of hosts and network port allowed for users to run calculations,
  • the list of codes available on the server,
  • [optional] spool directory path,
  • [optional] TCP port used for frontend file transfer,
  • [optional] timeout to auto-shutdown when inactive.

Each HOST element contains:

  • the network name of the user computer where graphical interface is installed (IP address or hostname), possibly a multicast IP (in this case, needs special configuration on frontend side),
  • a port((note that the same network name can be used in different HOST elements, if the port varies)) of this computer, waiting for Funz service (like 19001 19002, …), matching the frontend configuration,

Each CODE elements contain:

  • the name of the code to launch,
  • the shell command used to launch code:
    • Using shell alias commands, even well configured in environment is highly discouraged, prefer a complete path call: /path/to/my/startup/ instead
    • It is often preferable to modify the startup script code to adapt it to Funz. For example, applying a dos2unix on the input files is often necessary to limit the problems of portability of data files
  • [optionally] a backend ‘cplugin’ for better support of code startup, error, kill or running status report.

Then, the ‘calculator.xml’ file lists all hosts and codes in this format:

<CALCULATOR spool="/tmp" port="10000" timeout="3600">
   <HOST name="" port="19001" />
   <HOST name="" port="19002" />
   <HOST name="" port="19001" />
   <HOST name="" port="19002" />
   <HOST name="" port="19001" />
   <HOST name="" port="19002" />
   <HOST name="" port="19003" />
   <CODE command="cristal.v1.2 -p" name="Cristal_1.2" />

   <CODE command="/opt/Funz/scripts/mcnp5" name="MCNP"

Startup of backend service

The startup of the backend service is basically done by hand, using the ‘’ / ‘FunzDaemon.bat’ script. A more complete script, adapted for multi-CPU usage is also available for bash environment : ‘’ (and ‘’), which accepts an arbitrary number of CPU as first argument, and properly manage shutdown of its subprocesses.

It is also possible to use these scripts for automatic service startup:

  • on Unix / Linux: create a daemon startup script (in /etc/init.d directory for example) calling or :
    echo " * Launching FUNZ daemon ..."
    . /home/user/.bash_profile
    start-stop-daemon --start --chuid user --exec "$FUNZ_HOME/ 4" --chdir $FUNZ_HOME > /var/log/FunzDaemon.log 2>&1 &
    echo " * FUNZ daemon running ..."
    exit 0
  • on Windows: you can use the SC.exe, to record ‘FunzDaemon.bat’ as a service: sc.exe create "FunzDaemon" binPath= "C:\Program Files\Funz\FunzDaemon.bat" (pay attention to keep space between binpath= and C:\...)

Improve this page