Changeset 9535


Ignore:
Timestamp:
Jan 29, 2015, 11:45:09 AM (9 years ago)
Author:
steve
Message:

Fixed up setup.py script to include pymetis

Location:
trunk/anuga_core
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/anuga_core/compile_all.py

    r9503 r9535  
    5959    os.chdir('source')
    6060    os.chdir('anuga')
    61     os.chdir('parallel')
     61    #os.chdir('parallel')
    6262    os.chdir('pymetis')
    6363
    6464    print 'Changing to', os.getcwd()       
    6565
    66     make_logfile = os.path.join(buildroot, 'make_metis.log')
    67     options = ''
    68     if sys.platform == 'win32':
    69         options = 'for_win32'
    70     else:
    71         if os.name == 'posix':
    72             if os.uname()[4] in ['x86_64', 'ia64']:
    73                 options = ' '
    74 
    75     make_command = 'make %s > %s' % (options, make_logfile)
    76     print make_command
    77     err = os.system(make_command)
     66    cmd = 'python setup.py build_ext --inplace -f '
     67    print cmd
     68    err = os.system(cmd)
    7869    if err != 0:
    79         msg = 'Could not compile Metis '
     70        msg = 'Could not compile pymetis '
    8071        msg += 'on platform %s, %s\n' % (sys.platform, os.name)
    81         msg += 'You need to compile Metis manually '
     72        msg += 'You need to compile metis manually '
    8273        msg += 'if you want to run ANUGA in parallel.'
    8374        raise Exception, msg
    8475    else:
    85         msg = 'Compiled Metis succesfully. Output from Make is available in %s'\
    86             % make_logfile
     76        msg = 'Compiled pymetis successfully.'
    8777        print msg
     78
     79
     80
     81   
     82    ## make_logfile = os.path.join(buildroot, 'make_metis.log')
     83    ## options = ''
     84    ## if sys.platform == 'win32':
     85    ##     options = 'for_win32'
     86    ## else:
     87    ##     if os.name == 'posix':
     88    ##         if os.uname()[4] in ['x86_64', 'ia64']:
     89    ##             options = ' '
     90
     91    ## make_command = 'make %s > %s' % (options, make_logfile)
     92    ## print make_command
     93    ## err = os.system(make_command)
     94    ## if err != 0:
     95    ##     msg = 'Could not compile Metis '
     96    ##     msg += 'on platform %s, %s\n' % (sys.platform, os.name)
     97    ##     msg += 'You need to compile Metis manually '
     98    ##     msg += 'if you want to run ANUGA in parallel.'
     99    ##     raise Exception, msg
     100    ## else:
     101    ##     msg = 'Compiled Metis succesfully. Output from Make is available in %s'\
     102    ##         % make_logfile
     103    ##     print msg
    88104       
    89105except:
     
    102118    print
    103119    print '-----------------------------------------------'
    104     print 'Attempting to compile pypar_extras'
     120    print 'Attempting to compile mpiextras'
    105121    print '-----------------------------------------------'
    106122
     
    110126    os.chdir('anuga')
    111127    os.chdir('parallel')
    112     os.chdir('pypar_extras')
     128    #os.chdir('pypar_extras')
    113129
    114     cmd = 'python anuga_setup.py'
     130    cmd = 'python setup.py build_ext --inplace -f '
    115131    print cmd
    116132    err = os.system(cmd)
    117133    if err != 0:
    118         msg = 'Could not compile pypar_extras '
     134        msg = 'Could not compile mpiextras '
    119135        msg += 'on platform %s, %s\n' % (sys.platform, os.name)
    120         msg += 'You need to compile pypar_extras manually '
     136        msg += 'You need to compile mpiextras manually '
    121137        msg += 'if you want to run ANUGA in parallel.'
    122138        raise Exception, msg
    123139    else:
    124         msg = 'Compiled pypar_extras successfully.'
     140        msg = 'Compiled mpiextras successfully.'
    125141        print msg
    126142except:
  • trunk/anuga_core/source/anuga/setup.py

    r9528 r9535  
    2727    config.add_subpackage('parallel')
    2828    config.add_subpackage('pmesh')
     29    config.add_subpackage('pymetis')
    2930    config.add_subpackage('shallow_water')
    3031    config.add_subpackage('structures')
Note: See TracChangeset for help on using the changeset viewer.