/[escript]/trunk-mpi-branch/SConstruct
ViewVC logotype

Diff of /trunk-mpi-branch/SConstruct

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1116 by gross, Thu Apr 12 10:01:47 2007 UTC revision 1117 by ksteube, Tue Apr 24 05:23:21 2007 UTC
# Line 86  opts.AddOptions( Line 86  opts.AddOptions(
86    ('cc_flags_debug', 'C compiler flags to use (Debug build)', '-g -O0 -ffast-math -std=c99 -fPIC -Wno-unknown-pragmas'),    ('cc_flags_debug', 'C compiler flags to use (Debug build)', '-g -O0 -ffast-math -std=c99 -fPIC -Wno-unknown-pragmas'),
87    ('cxx_flags', 'C++ compiler flags to use (Release build)', '--no-warn -ansi'),    ('cxx_flags', 'C++ compiler flags to use (Release build)', '--no-warn -ansi'),
88    ('cxx_flags_debug', 'C++ compiler flags to use (Debug build)', '--no-warn -ansi -DDOASSERT -DDOPROF'),    ('cxx_flags_debug', 'C++ compiler flags to use (Debug build)', '--no-warn -ansi -DDOASSERT -DDOPROF'),
89      ('omp_flags', 'OpenMP compiler flags to use (Release build)', ''),
90      ('omp_flags_debug', 'OpenMP compiler flags to use (Debug build)', ''),
91    ('ar_flags', 'Static library archiver flags to use', None),    ('ar_flags', 'Static library archiver flags to use', None),
92    ('sys_libs', 'System libraries to link with', [ 'pthread' , 'rt' ] ),    ('sys_libs', 'System libraries to link with', [ 'pthread' , 'rt' ] ),
93    ('tar_flags','flags for zip files','-c -z'),    ('tar_flags','flags for zip files','-c -z'),
# Line 236  if useMPI: Line 238  if useMPI:
238     env.Append(CPPDEFINES=['PASO_MPI',])     env.Append(CPPDEFINES=['PASO_MPI',])
239     env.Append(CDEFINES=['PASO_MPI',])     env.Append(CDEFINES=['PASO_MPI',])
240    
241    try:
242      omp_flags = env['omp_flags']
243      omp_flags_debug = env['omp_flags_debug']
244    except KeyError:
245      print "omp_flags = ''"
246      print "omp_flags_debug = ''"
247    
248    # OpenMP and MPI conflict on the Altix, maybe can fix this for mixed mode programming
249    # This disables both OpenMP and MPI on all systems but is an OK fix for now
250    if useMPI:
251      omp_flags = ''
252      omp_flags_debug = ''
253    
254  if dodebug:  if dodebug:
255      try:      try:
256        flags = env['cc_flags_debug']        flags = env['cc_flags_debug'] + ' ' + omp_flags_debug
257        env.Append(CCFLAGS = flags)        env.Append(CCFLAGS = flags)
258      except KeyError:      except KeyError:
259        pass        pass
260  else:  else:
261     try:     try:
262        flags = env['cc_flags']        flags = env['cc_flags'] + ' ' + omp_flags
263        env.Append(CCFLAGS = flags)        env.Append(CCFLAGS = flags)
264     except KeyError:     except KeyError:
265        pass        pass

Legend:
Removed from v.1116  
changed lines
  Added in v.1117

  ViewVC Help
Powered by ViewVC 1.1.26