MAD-X is improved continuously by the MAD team as well as other collaborators. This webpage is dedicated to developers who want to participate to the improvement of the application.
The source code is avalaible on the GitHub repository, which includes a Wiki on Git.
Note: every development must be done on a separate branch from the master and pass all the tests before being merged through a Pull Request (mandatory). All developpers should subscribe to notifications and mad-dev e-group (see support) to be informed about what is ongoing on in the repository.
MAD-X is built and tested each night to ensure that new developments do not break the proper functioning of the application on all supported platforms. If some tests appear to be failing, a report summary containing the list of failing tests and the corresponding architectures is sent to the e-group mad-src (see support). The complete reports of the builts and the tests for each supported architecture can be browsed from the reports repository, where the history is kept for one year.
The scripts used to make the nightly reports can be found in the directory scripts and seen as examples of proper usage of the builds and tests system.
To build MAD-X, you will need a set of tools usually available on Unixes by default (but not on Windows): GNU make (>=3.81), GNU gcc, g++, gfortran compilers (>=4.4, 32/64 bit on Darwin) and Intel icc, icl, ifort compilers (>=14, optional), as well as Xorg X11 (32/64 bit on Darwin). Lahey, Nagfor and g95 are also used from time to time but not actively supported.
make <package>-<platform>[<arch>]-<compiler> [mad-options] [build-options]where possible target name components are (135 possible targets):
The build system supports tens of targets to clean, report, debug and trace what it's going on. For example, to clean everything and restart from scratch, you can run make cleanall. The system is also highly configurable through tens of variables (like options above). For more details, look at the project Makefile[_xxx] or at the build system makefiles in the directory make.
Notes: the option ONLINE=yes works only on linux platforms (e.g. lxplus) and the default for DESTDIR is ./build.
The following instructions assume that you downloaded the source release from the GitHub repository or the releases repository, and that madx and numdiff are in your PATH or in the madX directory.
make tests-all [ARCH=32|64] make tests [ARCH=32|64] make tests [ARCH=32|64] TESTS="test-name-list" make tests [ARCH=32|64] TESTS=detect make test-name-list [ARCH=32|64]
To speed-up the tests setup for numdiff constraints (i.e. .cfg files), you can run the above make commands with the option TESTCMD= (i.e. force empty option) that will run only numdiff (very fast) and not madx (may be slow).
Note that on Windows platforms, you will need to download and install GNU make to run the tests.