Changeset 8761


Ignore:
Timestamp:
Mar 15, 2013, 5:24:20 PM (12 years ago)
Author:
steve
Message:

getting rid of these _parallel_.py files and put in a test to only compile and
test he parallel code if pypar installed

Location:
trunk/anuga_core
Files:
2 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/anuga_core/compile_all.py

    r8760 r8761  
    7070os.chdir(buildroot)   
    7171
     72try:
     73    print '-----------------------------------------------'
     74    print 'Attempting to compile Metis for parallel ANUGA!'
     75    print '-----------------------------------------------'
     76
     77    # Attempt to compile Metis for use with anuga_parallel
     78    os.chdir('source')
     79    os.chdir('anuga_parallel')
     80    os.chdir('pymetis')
     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
     104
     105    print
     106    print '-----------------------------------------------'
     107    print 'Attempting to compile pypar_extras'
     108    print '-----------------------------------------------'
     109
     110    os.chdir('..')
     111    os.chdir('pypar_extras')
     112
     113    cmd = 'python anuga_setup.py'
     114    print cmd
     115    err = os.system(cmd)
     116    if err != 0:
     117        msg = 'Could not compile pypar_extras '
     118        msg += 'on platform %s, %s\n' % (sys.platform, os.name)
     119        msg += 'You need to compile pypar_extras manually '
     120        msg += 'if you want to run ANUGA in parallel.'
     121        raise Exception, msg
     122    else:
     123        msg = 'Compiled pypar_extras succesfully.'
     124        print msg
     125except:
     126    print 'anuga_parallel code not compiled'
     127
     128
     129
     130
    72131
    73132
  • trunk/anuga_core/test_all.py

    r8760 r8761  
    1212print 'Changing to', os.getcwd() # This is now different from buildroot   
    1313execfile('test_all.py')
     14
     15
     16# Try to run parallel tests if pypar installled
     17
     18try:
     19    import pypar
     20    os.chdir(buildroot)
     21    os.chdir('source')
     22    os.chdir('anuga_parallel')
     23    print
     24    print '===================== anuga_parallel tests =========================='
     25    print 'Changing to', os.getcwd()
     26    execfile('test_all.py')
     27except:
     28    print 'anuga_parallel tests not run'
     29
     30
    1431
    1532
Note: See TracChangeset for help on using the changeset viewer.