MES Tools to Train and Test Models
MES Tools to Train and Test Models
Overview
These are command-line executables for training, testing, and manipulating models, as well as other utilities developed by MES.
You can download a prebuilt release from the Release page. The release is built with glibc 2.17 and will work out of the box on systems with glibc ≥ 2.17 (e.g., Ubuntu >= 13.04, Centos>=7, eg.). If you need to build from source, follow the instructions below.
For general instructions on how to use prebuilt binaries, refer to the Prebuilt Releases section in the main Installation Guide.
Installation Steps
- Install Boost Libraries: Follow the instructions in the Install Boost Libraries section of the main Installation Guide. Boost is a core dependency for MES Tools. If you compile Boost from source, ensure
BOOST_ROOTis set correctly. - Clone the required repositories:
- Change to the
MR_Toolsdirectory: -
Configure Build Paths: Instead of directly editing
CMakeLists.txt, it's recommended to pass configuration variables via CMake arguments or environment variables.-
then the build script should automatically detectMR_LIBSPath: The build system needs to know the location of yourmedpython(MR_LIBS) clone. If your directory structure is:MR_LIBS. Otherwise, you might need to set theLIBS_PATHenvironment variable before running the build script, or pass it as a CMake argument. -
BOOST_ROOTPath (if compiled from source): If you compiled Boost from source, ensure theBOOST_ROOTenvironment variable is set to your Boost installation directory (e.g.,/home/user/my_builds/Boost). The build system will use this to find Boost.
Example of setting environment variables before building:
5. Build the tools: -
A full docker image for compilation steps can be found under this link:
- 01.basic_boost A base docker image with Boost
- 02.build_tools A build with tools prepared for usage
Verification
To verify that the MES Tools have been successfully built, you can try running one of the command-line executables.
This command should output the version information for the Flow executable, indicating a successful build and correct environment setup.
Common Issues
-
Can't find Boost libray errors in compilation - Please delete the "./build" folder to recreate all Makefiles again. It holds some bad settings of Boost in cache.
-
Can't find
boost_atomic.soin runtime: This usually indicates a linking issue. Ensure that yourBOOST_ROOT(if compiled from source) is correctly set and thatLD_LIBRARY_PATHincludes the Boost library directory. Thefull_build.shscript andCMakeLists.txtshould ideally handle linkingboost_atomicautomatically if it's a required component. If not, you might need to explicitly add it to theBOOST_LIBSin theCMakeLists.txt. -
Running an executable may fail with:
This indicates the Boost shared libraries are not found at runtime. SetLD_LIBRARY_PATHto point to your Boost lib directory. Add to your ~/.bashrc or run once per session:If Boost was installed via the system packages (Ubuntu 22.04 uses 1.74, 24.04 uses 1.83), install the appropriate dev packages instead of adjustingLD_LIBRARY_PATH:Replace 1.83 with 1.74 on Ubuntu 22.04 when needed.