use HAVE_MPI directive and ENV variable to determine compilation

testNN will not compile with HAVE_MPI=1
add train/test data
fix warnings and update compilation settings