Computer simulation of the fractionation of olivine and sulfide from mafic and ultramafic magmas