Progress on porting to C++. LUdecomp seems to fail for N>1