Programming the LU Factorization for a Multicore System with Accelerators