Ignore:
Timestamp:
May 12, 2009, 9:59:44 AM (15 years ago)
Author:
rwilson
Message:

Improved reporting.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/numpy_misc/tools/acceptance_tests/test_latency_bandwidth.py

    r6996 r7017  
    99Processor_Numbers = [2, 4, 8, 16]
    1010
     11name = 'Running latency/bandwidth test'
     12
    1113def test(logfile):
    1214    result = True
    13     start_time = time.time()
    1415
    1516    (cluster, domain) = util.get_hostname()
    16 
    17     util.header(logfile, 'Running latency/bandwidth test on %s.' % cluster)
    1817
    1918    # get python to run
     
    2322    obj_file = 'ctiming_%s' % cluster
    2423    cmd = ('mpicc ctiming.c -lm -o %s' % obj_file)
    25     util.log_print(logfile, 'Compiling ctiming.c ...')
     24    util.log_print_nl(logfile, 'Compiling ctiming.c:')
     25    util.log_print_nl(logfile,cmd)
    2626    (_, fd) = os.popen4(cmd)
    2727    output = fd.read()
     
    3030        util.log_print_nl(logfile, 'ERRORS COMPILING')
    3131        util.log_print(logfile, output)
    32         util.footer(logfile, start_time)
    3332        return False
    3433
    35     util.log_print_nl(logfile, 'OK\n')
     34    util.log_print_nl(logfile)
    3635
    3736    # run the tests
     
    3938    machines_file = os.path.join('~', '.machines_%s' % cluster)
    4039    for num_procs in Processor_Numbers:
    41         cmd = ('mpirun -np %2d -hostfile %s %s'
     40        cmd = ('mpirun -nolocal -np %2d -hostfile %s %s'
    4241               % (num_procs, machines_file, obj_file))
    4342        util.log_print(logfile, cmd + ' ...')
     
    4847            util.log_print_nl(logfile, 'ERRORS')
    4948            util.log_print(logfile, '\n'.join(output))
    50             util.footer(logfile, start_time)
    5149            return False
    5250
     
    6664            util.log_print_nl(logfile, 'ERRORS')
    6765            util.log_print(logfile, '\n'.join(output))
    68             util.footer(logfile, start_time)
    6966            return False
    7067           
     
    7976        util.log_print(logfile, '%d\t%.1f\t%d\n'
    8077                       % (num_processors, estimated_bandwidth, estimated_latency))
    81 
    82     util.footer(logfile, start_time)
    8378
    8479    os.remove(obj_file)
Note: See TracChangeset for help on using the changeset viewer.