@@ -252,8 +252,11 @@ def _build_fluent_launch_args_string(**kwargs) -> str:
252252 launch_args_string += v ["fluent_format" ].replace ("{}" , str (argval ))
253253 addArgs = kwargs ["additional_arguments" ]
254254 if "-t" not in addArgs and "-cnf=" not in addArgs :
255- mlist = load_machines (ncores = kwargs ["processor_count" ])
256- launch_args_string += " " + build_parallel_options (mlist )
255+ parallel_options = build_parallel_options (
256+ load_machines (ncores = kwargs ["processor_count" ])
257+ )
258+ if parallel_options :
259+ launch_args_string += " " + parallel_options
257260 return launch_args_string
258261
259262
@@ -433,15 +436,20 @@ def _generate_launch_string(
433436):
434437 """Generates the launch string to launch fluent."""
435438 if _is_windows ():
436- exe_path = '"' + str (get_fluent_exe_path (** argvals )) + '"'
439+ exe_path = str (get_fluent_exe_path (** argvals ))
440+ if " " in exe_path :
441+ exe_path = '"' + exe_path + '"'
437442 else :
438443 exe_path = str (get_fluent_exe_path (** argvals ))
439444 launch_string = exe_path
440445 launch_string += _build_fluent_launch_args_string (** argvals )
441446 if meshing_mode :
442447 launch_string += " -meshing"
443- launch_string += f" { additional_arguments } "
444- launch_string += f' -sifile="{ server_info_filepath } "'
448+ if additional_arguments :
449+ launch_string += f" { additional_arguments } "
450+ if " " in server_info_filepath :
451+ server_info_filepath = '"' + server_info_filepath + '"'
452+ launch_string += f" -sifile={ server_info_filepath } "
445453 launch_string += " -nm"
446454 launch_string = _update_launch_string_wrt_gui_options (
447455 launch_string , show_gui , additional_arguments
0 commit comments