SLHALib – a library for SUSY Les Houches Accord I/O


The SUSY Les Houches Accord (SLHA) has standardized and significantly simplified the exchange of input and output parameters of SUSY models between such disparate applications as spectrum calculators and event generators.

The SLHA library provides simple routines to read and write files in SLHA format. It performs input and output tasks only and does not modify the numbers, which means there is no routine to compute, say, a particular quantity at a new scale. The library is written in native Fortran 77 and data are kept in a single double complex array and accessed through preprocessor variables.

The SUSY Les Houches Accord 1 has been published in JHEP07 (2004) 036 [hep-ph/0311123].

The SLHALib 1 has been published in hep-ph/0408283.

The SUSY Les Houches Accord 2 has been published in Comput. Phys. Commun. 180 (2009) 8 [arXiv:0801.0045].

The SLHALib 2 has been published in Comput. Phys. Commun. 180 (2009) 1681 [hep-ph/0605049].


Downloads (hover over download link for MD5):
After unpacking the tar file, change into the directory SLHALib-m.n and type
   ./configure
   make
to build the library libSLHA.a. There are two simple demonstration programs in the demo subdirectory.

Compiling a program that uses the SLHA library is in principle equally straightforward. The only tricky thing is that one has to relax Fortran's 72-column limit. This is because even lines perfectly within the 72-column range may become longer after the preprocessor's substitutions. While essentially every Fortran compiler offers such an option, the name is quite different. A glance at the man page should suffice to find out. Here are a few common choices:

Compiler Platform/OS Option name
gfortran, g77 any -ffixed-line-length-none
pgf77, pgf90, pghpf Linux x86, MacOS -Mextend
ifort Linux x86, MacOS -extend_source
f77, f90 Tru64 Alpha -extend_source
f77 SunOS, Solaris -e
fort77 HP-UX +es

To compile and link your program, add this option and -Ipath/include -Lpath/lib -lSLHA to the compiler command line, where path is the location of the SLHA library, e.g.

   gfortran -ffixed-line-length-none -I$HOME/SLHALib-m.n/include myprogram.F -L$HOME/SLHALib-m.n/lib -lSLHA

It is also possible to use the SLHALib in C and C++. In this case one needs to include the header file CSLHA.h in the program text. Compilation should be done using the fcc script, i.e. replace the invocation of the C compiler with fcc, as in

   fcc -I$HOME/SLHALib-m.n/include myprogram.c -L$HOME/SLHALib-m.n/lib -lSLHA
The fcc script is installed together with the library and automatically adds the necessary libraries for linking with Fortran code.
Thanks for looking in.

Please send bug reports, suggestions, fan mail, etc. to Thomas Hahn, hahn@feynarts.de.

This site and the programs offered here are not commercial. SLHALib is an open-source package and free of charge.
If you want to use SLHALib in a commercial application, make sure you understand the GNU library general public license under which the SLHALib is distributed.
The SLHALib is being developed at the Max Planck Institute for Physics in Munich.

Data protection statement and Imprint

Last update: 28 May 18 Thomas Hahn