This branch makes it possible to run several MBDyn processes at the same time using multiple threads for assembly and solver in all MBDyn processes. Each thread can be bound to a CPU core provided as command line argument. For example if you have a SMP computer with 6 cores, the following command will run one MBDyn process which uses core 0-2 and a second MBDyn process which uses core 3-5:
mbdyn -f model1 --affinity 0,1,2 >& /dev/null & mbdyn -f model2 --affinity 3,4,5
Since assembly and solver never run at the same time, they are assigned the same set of CPU cores.