edits to compile with MKL on MAc