Project

General

Profile

Modules and Compilation

First of all, the script build.sh must be run.
Then to compile the Nomad modules, go to the build directory. The following directives are applicable:
  • mod : makes everything, i.e., uninstalls the modules, updates the Makefile, compiles and installs the modules.
  • am : uninstalls the modules, updates the Makefile.
  • install : installs the modules.
  • clean : clean the modules objects.

It is recommended to always use mod. Note that the directives work with distributed make.
For example with mk alias:

> mk mod

Additional directives that can be used:
  • distclean : if after the directive am the compilation fails with obscure reasons, distclean could resolve the problem. It must be followed by build.sh.

Note that the configure files must have been generated by build.sh.

Compile and Install an Individual Module

To compile an individual module, go to the build directory and call the installmod.sh script that has the following parameters:
  • make : make command to call
  • module : name of the module (found in Module.xml)

For instance :

> installmod.sh make aerolasdoppler

If you want to use an alias instead of make, replace the alias:

> installmod.sh 'make -s -j14 CXX="colorgcc"' aerolasdoppler

In fact, it is not easy to call the alias in the installmod.sh script.

To simplify, you can create an alias:

> alias im="./installmod.sh 'make -s -j14 CXX=\"colorgcc\"'" 
> im aerolasdoppler

If you want to call im from the build directory then:

> alias im="../installmod.sh 'make -s -j14 CXX=\"colorgcc\"'" 
> cd build
> im aerolasdoppler

Manage the List of Compiled Modules

Restriction the list of compiled modules is made in a module configuration file.

Format of the Module Configuration File

The XML file contains the list of modules that are compiled and installed in the mod directory.

The tags are modules, include, all, exclude.

Example 1:

<modules>
  <include name=”m1”/>
  <include name=”m2”/>
</modules>

The modules compiled are m1, m2.

Example 2:

<modules>
  <all/>
  <exclude name=”m3”/>
  <exclude name=”m4”/>
</modules>

The modules compiled are all the modules except m3 and m4.

Module Configuration File and Nomad Server

The module configuration file can be placed anywhere. However its configuration depends on the machine.

Personal Account

On a personal machine, it is recommended to compile all the possible modules. For example if the tangoproxy module cannot be compiled, the configuration file will be:

<modules>
  <all/>
  <exclude name=”tangoproxy”/>
</modules>

The file is recommended to be $HOME/.NomadModuleConfig.xml.
The environment variable $NOMAD_MODULE_CONFIG has to be set (in the .bashrc file):

export NOMAD_MODULE_CONFIG=$HOME/.NomadModuleConfig.xml

Next time make mod is called, only the specified modules will be compiled and installed.

Instrument Account

On an instrument machine, it is recommended to compile the fewest necessary modules.
The file is recommended to be $HOME/.nomadserver/Config/ModuleConfig.xml.
The environment variable $NOMAD_MODULE_CONFIG has to be set (in the .bashrc file):

export NOMAD_MODULE_CONFIG=$HOME/.nomadserver/Config/ModuleConfig.xml

To initialize the module configuration file, compile first all the possible modules.
For example if the tangoproxy module cannot be compiled, the configuration file will be:

<modules>
  <all/>
  <exclude name=”tangoproxy”/>
</modules>

Minimize the Module Configuration File

Once the modules are compiled, to generate the minimum list of modules, execute the following command:

> nomadserver minconfig

The module configuration file is modified, the original file is backed up (.org suffix).
Next time make mod is called, only the specified modules will be compiled and installed.

Minimize a Bunch of Module Configuration Files

To minimize the module configuration files of several instruments, compile first all the modules (with previous module configuration file example) on your personal computer.
Then for each instrument configuration:
  • Set the instrument INST configuration by setting .nomadserver
  • Go to the module build directory and run:
    > make sequence
    > $NOMAD_HOME/moduleloadminimizer.sh INST.xml
    

The file INST.xml is the minimized module configuration file and can replace the instrument file (.NomadModuleConfig.xml).
On your personal computer, you can change the INST configuration and re-run the commands. Note that the .NomadModuleConfig.xml of your personal computer is unchanged.