diff -Naur ORIG/CMakeLists.txt PATCHED/CMakeLists.txt
--- ORIG/CMakeLists.txt	2026-05-21 19:59:18.804125157 +0000
+++ PATCHED/CMakeLists.txt	2026-05-21 19:59:18.804200129 +0000
@@ -341,6 +341,7 @@
   set_target_properties(${mylib}        PROPERTIES POSITION_INDEPENDENT_CODE ON  SOVERSION 0.0.0)
   set_target_properties(${mylib}        PROPERTIES DEFINE_SYMBOL "")
   set_target_properties(${mylib}        PROPERTIES OUTPUT_NAME ${mylibname})
+  target_link_libraries(${mylib}  PRIVATE Threads::Threads)
   target_compile_features(${mylib} PRIVATE cxx_std_11)
   set_target_properties(${mylib} PROPERTIES  ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/outputs/${CMAKE_INSTALL_LIBDIR}/SHERPA-MC/$<0:>
                                              LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/outputs/${CMAKE_INSTALL_LIBDIR}/SHERPA-MC/$<0:>
diff -Naur ORIG/Examples/BSM/UFO_MSSM/MSSM/write_param_card.py PATCHED/Examples/BSM/UFO_MSSM/MSSM/write_param_card.py
--- ORIG/Examples/BSM/UFO_MSSM/MSSM/write_param_card.py	2026-05-21 19:59:18.804165843 +0000
+++ PATCHED/Examples/BSM/UFO_MSSM/MSSM/write_param_card.py	2026-05-21 19:59:18.804266724 +0000
@@ -117,8 +117,10 @@
     def write_dep_param_block(self, lhablock):
         import cmath
         from .parameters import all_parameters
-        for parameter in all_parameters:
-            exec("%s = %s" % (parameter.name, parameter.value))
+        ns = { "cmath": cmath, "complexconjugate": lambda x: x.conjugate(), }
+        for par in all_parameters: # par.value must be a valid Python expression string 
+          code = f"{par.name} = {par.value}" 
+          exec(code, ns)
         text = "##  Not dependent paramater.\n"
         text += "## Those values should be edited following analytical the \n"
         text += "## analytical expression. Some generator could simply ignore \n"
diff -Naur ORIG/MODEL/UFO/src/ufo_interface/lorentz_writer.py PATCHED/MODEL/UFO/src/ufo_interface/lorentz_writer.py
--- ORIG/MODEL/UFO/src/ufo_interface/lorentz_writer.py	2026-05-21 19:59:18.804200129 +0000
+++ PATCHED/MODEL/UFO/src/ufo_interface/lorentz_writer.py	2026-05-21 19:59:18.804297585 +0000
@@ -196,34 +196,55 @@
         return f'j{index}->SetS({spin_or});\nreturn j{index};\n}}\n'
 
 
+def _worker_write(args):
+    path, nmax, struct = args
+
+    # Recreate writer inside the worker process
+    lorentz_template = pkgutil.get_data(
+        __name__, "Templates/lorentz_calc_template.C"
+    ).decode("utf-8")
+
+    template = Template(lorentz_template)
+    outpath = Path(path)
+
+    # Compute implementation
+    lorentz_impl = _LorentzImpl(struct)
+    lorentz_impl()
+    impl, ff_impl, ff_decl = (
+        lorentz_impl.impl,
+        lorentz_impl.ff_impl,
+        lorentz_impl.ff_decl,
+    )
+
+    # Write file
+    subs = {
+        "vertex_name": struct.name,
+        "implementation": impl,
+        "form_factor_impl": ff_impl,
+        "form_factor_decl": ff_decl,
+    }
+
+    with open(outpath / f"{struct.name}.C", "w") as f:
+        f.write(template.substitute(subs))
+
+
+
 class LorentzWriter:
     def __init__(self, path, nmax):
-        lorentz_template = pkgutil.get_data(__name__,
-                                            "Templates/lorentz_calc_template.C")
-        lorentz_template = lorentz_template.decode('utf-8')
-        self._template = Template(lorentz_template)
-        self._path = Path(path) if not isinstance(path, Path) else path
+        self._path = Path(path)
         self._nmax = nmax
 
-    def _get_impl(self, struct):
-        lorentz_impl = _LorentzImpl(struct)
-        lorentz_impl()
-        return lorentz_impl.impl, lorentz_impl.ff_impl, lorentz_impl.ff_decl
-
     def write_all(self, structs, ncores):
-        structs = filter(lambda struct: _filter_lorentz(struct, self._nmax),
-                         structs)
-        with multiprocessing.Pool(ncores) as pool:
-            pool.map(self.write, structs)
-
-    def write(self, struct):
-        progress(f"Calculating lorentz structure: {struct.name}")
-        impl, ff_impl, ff_decl = self._get_impl(struct)
-        subs = {
-            'vertex_name': struct.name,
-            'implementation': impl,
-            'form_factor_impl': ff_impl,
-            'form_factor_decl': ff_decl,
-        }
-        with open(f'{self._path}/{struct.name}.C', 'w') as output:
-            output.write(self._template.substitute(subs))
+        # Filter first (still in main process)
+        filtered = [
+            s for s in structs if _filter_lorentz(s, self._nmax)
+        ]
+
+        # Prepare arguments for workers
+        args = [(self._path, self._nmax, s) for s in filtered]
+
+        for a in args:
+            _worker_write(a)
+
+#        with multiprocessing.Pool(ncores) as pool:
+#            pool.map(_worker_write, args)
