Ab-Initio Simulation Of Spintronic Devices