def test_non_mpi(self): """Test that node and cpu count are set to zero if MPI isn't used.""" parser = LSFParser('testSite', 'testHost', False) line = ( '"JOB_FINISH" "5.1" 1089407406 699195 283 33554482 1 1089290023' ' 0 0 1089406862 "raortega" "8nm" "" "" "" "lxplus015" "prog/st' 'ep3c" "" "/af/step3c-362.txt" "/af/epc-362.txt" "1089290023.69' '9195" 0 1 "tbed0079" 64 3.3 "" "/af/hset.pl 362 7 8" 277.2100 ' '17.280000 0 0 -1 0 0 927804 87722 0 0 0 -1 0 0 0 0 0 -1 "" "de' 'fault" 0 1 "" "" 0 310424 339112 "" "" ""') record = parser.parse(line) cont = record._record_content self.assertEquals(cont['NodeCount'], 0, "Node count not zero for non-mpi parser") self.assertEquals(cont['Processors'], 0, "Processors not zero for non-mpi parser")
def setUp(self): self.parser = LSFParser('testSite', 'testHost', True)