Changeset 7456


Ignore:
Timestamp:
Sep 1, 2009, 12:10:30 PM (11 years ago)
Author:
ole
Message:

Updated compile error message on Windows (compiling Metis)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • anuga_core/compile_all.py

    r7455 r7456  
    3838os.chdir(buildroot)   
    3939
     40print '-----------------------------------------------'
     41print 'Attempting to compile Metis for parallel ANUGA!'
     42print '-----------------------------------------------'
    4043
    4144# Attempt to compile Metis for use with anuga_parallel
     
    4346os.chdir('pymetis')
    4447
     48make_logfile = 'make_metis.log'
     49options = ''
    4550if sys.platform == 'win32':
    46     os.system('make for_win32')
     51    options = 'for_win32'
    4752else:
    4853    if os.name == 'posix':
    4954        if os.uname()[4] in ['x86_64', 'ia64']:
    50             os.system('make COPTIONS="-fPIC"')
    51         else:
    52             os.system('make')
    53     else:
    54         msg = 'Not sure how to complie Metis on platform: %s, %s' % (sys.platform, os.name)
    55         raise Exception, msg
     55            options = 'COPTIONS="-fPIC"'
    5656
    57 
    58    
     57make_command = 'make %s > %s' % (options, make_logfile)
     58print make_command
     59err = os.system(make_command)
     60if err != 0:
     61    msg = 'Could not compile Metis '
     62    msg += 'on platform %s, %s\n' % (sys.platform, os.name)
     63    msg += 'You need to compile Metis manually '
     64    msg += 'if you want to run ANUGA in parallel.'
     65    raise Exception, msg
     66else:
     67    msg = 'Compiled Metis succesfully. Output from Make is available in %s'\
     68        % Make_logfile
    5969print 'That took %.3fs' %(time.time() - t0)
    6070
Note: See TracChangeset for help on using the changeset viewer.