1 | #!/usr/bin/env python
|
---|
2 | from __future__ import generators
|
---|
3 | import user
|
---|
4 | import config.base
|
---|
5 | import os
|
---|
6 |
|
---|
7 | class Configure(config.base.Configure):
|
---|
8 | def __init__(self, framework):
|
---|
9 | config.base.Configure.__init__(self, framework)
|
---|
10 | self.headerPrefix = ''
|
---|
11 | self.substPrefix = ''
|
---|
12 | return
|
---|
13 |
|
---|
14 | def __str__(self):
|
---|
15 | return ''
|
---|
16 |
|
---|
17 | def setupHelp(self, help):
|
---|
18 | import nargs
|
---|
19 | return
|
---|
20 |
|
---|
21 | def setupDependencies(self, framework):
|
---|
22 | config.base.Configure.setupDependencies(self, framework)
|
---|
23 | self.arch = framework.require('PETSc.utilities.arch', self)
|
---|
24 | self.scalartypes = framework.require('PETSc.utilities.scalarTypes', self)
|
---|
25 | self.bmake = framework.require('PETSc.utilities.bmakeDir', self)
|
---|
26 | self.datafilespath = framework.require('PETSc.utilities.dataFilesPath', self)
|
---|
27 | self.compilers = framework.require('config.compilers', self)
|
---|
28 | self.mpi = framework.require('config.packages.MPI', self)
|
---|
29 | self.x = framework.require('PETSc.packages.X', self)
|
---|
30 | return
|
---|
31 |
|
---|
32 | def configureRegression(self):
|
---|
33 | '''Output a file listing the jobs that should be run by the PETSc buildtest'''
|
---|
34 | jobs = [] # Jobs can be run always
|
---|
35 | rjobs = [] # Jobs can only be run with real numbers; i.e. NOT complex
|
---|
36 | ejobs = [] # Jobs that require an external package install (also cannot work with complex)
|
---|
37 | if self.mpi.usingMPIUni:
|
---|
38 | jobs.append('C_X_MPIUni')
|
---|
39 | if hasattr(self.compilers, 'FC'):
|
---|
40 | jobs.append('Fortran_MPIUni')
|
---|
41 | else:
|
---|
42 | jobs.append('C')
|
---|
43 | if self.x.found:
|
---|
44 | jobs.append('C_X')
|
---|
45 | if hasattr(self.compilers, 'FC'):
|
---|
46 | jobs.append('Fortran')
|
---|
47 | if self.compilers.fortranIsF90:
|
---|
48 | rjobs.append('F90')
|
---|
49 | if self.scalartypes.scalartype.lower() == 'complex':
|
---|
50 | rjobs.append('F90_Complex')
|
---|
51 | else:
|
---|
52 | rjobs.append('F90_NoComplex')
|
---|
53 | if self.scalartypes.scalartype.lower() == 'complex':
|
---|
54 | rjobs.append('Fortran_Complex')
|
---|
55 | else:
|
---|
56 | rjobs.append('Fortran_NoComplex')
|
---|
57 | if self.datafilespath.datafilespath:
|
---|
58 | if self.scalartypes.scalartype.lower() == 'complex':
|
---|
59 | rjobs.append('C_Complex')
|
---|
60 | else:
|
---|
61 | rjobs.append('C_NoComplex')
|
---|
62 | # add jobs for each external package BUGBUGBUG may be run before all packages
|
---|
63 | # Note: do these tests only for non-complex builds
|
---|
64 | if self.scalartypes.scalartype.lower() != 'complex':
|
---|
65 | for i in self.framework.packages:
|
---|
66 | if not i.name.upper() in ['SOWING','C2HTML','BLASLAPACK','MPI','SCALAPACK','BLACS','PTHREAD','CUDA','THRUST','VALGRIND','NUMDIFF']:
|
---|
67 | ejobs.append(i.name.upper())
|
---|
68 |
|
---|
69 | self.addMakeMacro('TEST_RUNS',' '.join(jobs)+' '+' '.join(ejobs)+' '+' '.join(rjobs))
|
---|
70 | return
|
---|
71 |
|
---|
72 |
|
---|
73 | def configure(self):
|
---|
74 | self.executeTest(self.configureRegression)
|
---|
75 | return
|
---|