start_master(Term,MaxStates,PortStart,Strict,MasterIP,Logfile,TmpDir,HashCycle) :-
init_zmq,
get_first_workpackage(Term,WP),
fast_buf_write(Term,Len1,Addr1),
print(size_model(Len1)),nl,flush_output,
alloc_term(Addr1, Len1, ModelChunk),
fast_buf_write(WP,Len2,Addr2),
alloc_term(Addr2, Len2, FWPChunk),
%AssertionMode = 0,
master_main(PortStart, MaxStates, Strict, ModelChunk, FWPChunk, MasterIP, Logfile, TmpDir,HashCycle,RetVal), !,
print(retval(RetVal)),nl,flush_output,
RetVal == 0.