Developers

For developers

Please read the license information before copying the source code. The GNU v2 license requires, among others, any derivative work to be distributed as open-source.

Repository location

The actual source code, along with resources and build tools, is stored in these repositories:

Molflow-specific code (contains build instructions in the readme file).

Synrad-specific code

Shared code embedded as a Git submodule in the above repos

All operating systems should allow CMake building:

  • Clone the repo to a local directory
  • Init shared code: git submodule init then git submodule update
  • Make a build subdirectory in the repo and cd into it: mkdir build then cd build
  • Configure the repo with CMake: cmake ..
  • Build it: make
  • The binaries will be written in bin or out/bin depending on the OS

Build example on Mac

1) We install Homebrew and dependencies:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install cmake libpng gsl sdl2 p7zip libomp

2) then we clone and build the repo:

git checkout https://gitlab.cern.ch/molflow_synrad/molflow.git
cd molflow
git submodule init
git submodule update
mkdir build
cd build
cmake ..
make -j8

On Linux, the dependency part is different (using apt or yum), but the second part is the same.

Branches

  • For MolFlow, master is the 2.9 beta, and master_2.8 is the 2.8 public
  • For SynRad, master_cli is the 1.5 beta, and master is the 1.4 public

Repo states to check out for guaranteed compile

On the Molflow repository, we use Git tags to mark commits that correspond to released versions. Check out these so they are guaranteed to build and run.

Tags for Molflow: https://gitlab.cern.ch/molflow_synrad/molflow/-/tags

Tags for Synrad: https://gitlab.cern.ch/molflow_synrad/synrad/-/tags

Old release snapshots

for Synrad and older, 2.6.x Molflow versions only. For Molflow 2.7+, use the repo cloning above

To make sure that you start from one of the complete, ready-to-compile repo versions (usually corersponding to published Molflow versions), at each new version a snapshot is made of the repository. Downloading the latest snapshot makes sure that you won't run into build errors.

The snapshots are tested to work with Visual Studio 2017.

Instructions:

  • Install Visual Studio Community 2017 with C++ development enabled in the installation options
  • Download and extract one of the snapshots below
  • Open molflow.sln or synrad.sln (versions 2.7+: molflow_win.sln in the Visual Studio folder)
  • In Visual Studio, choose x64 as platform (until version until 2.6.72, the default was Win32 which will fail due to supplied dlls being 64-bit)
  • You should be able to build the solution and run it

Git repo, including VS solution 2018-10-24 (Molflow 2.7.0.1)
Visual studio solution 2018-09-03 (Moflow 2.6.72, compatible Synrad coming soon)
Visual studio solution 2018-08-16 (Moflow 2.6.71, compatible Synrad coming soon)
Visual studio solution 2018-07-06 (Moflow 2.6.70, compatible Synrad coming soon)
Visual studio solution 2018-05-24 (Moflow 2.6.69 and Synrad 1.4.23)