Heat margarine, cocoa and water in a saucepan over medium heat, stirring continuously until it boils, remove from heat and add remaining ingredients, and mix well. Pour onto a greased 9x12 inch pan and bake for 40 minutes at 375 F.
To make the frosting bring the first three ingredients to a boil, remove from heat, add powdered sugar, stirring until smooth, add nuts, mix lightly. Frost cake while frosting is still warm for easier spreading.