add ensembleFinished predicate function
use ensembleFinished to check if we should exit
fixed def of ensembleFinished
fixed some compiler warnings, implemented ensembleFinished
include api for ensembleFinished
whitespace only
initial add