update memMonitor, calcuate array size
add debug variable, nn node +1