Changeset 5838
- Timestamp:
- Oct 15, 2008, 1:44:54 PM (16 years ago)
- Location:
- anuga_core/source/pypar-numeric
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/source/pypar-numeric/pypar.py
r5779 r5838 47 47 48 48 # Meta data 49 __version__ = '1.9.3' 50 __date__ = '24 April 2007' 51 __author__ = 'Ole M. Nielsen' 49 from __metadata__ import __version__, __date__, __author__ 52 50 53 51 -
anuga_core/source/pypar-numeric/setup.py
r5779 r5838 9 9 # Some times you'll have to add a file called pypar.pth 10 10 # containing the word pypar to site-packages 11 # 12 # See http://docs.python.org/dist/pure-pkg.html for more on distutils 11 13 12 14 # FIXME: Now mpiext.c and pypar.py are assumed to be in this directory. 15 # Maybe, we should put them in the default package directory, pypar. 16 # The repository structure would then be 17 # 18 # pypar 19 # demos 20 # documentation 21 # source 22 # pypar 13 23 14 24 from distutils.core import setup, Extension 25 26 # FIXME (Ole): This works, but I don't know how to use it 27 # Generate Python EGG if possible. 28 #try: 29 # from setuptools import setup, Extension 30 #except ImportError: 31 # pass 32 15 33 import distutils.sysconfig 16 34 import distutils.debug … … 19 37 import string 20 38 import tempfile 39 import numpy 40 from __metadata__ import __version__, __date__, __author__ 41 21 42 22 43 def setup_compiler(): 23 44 distutils.sysconfig.get_config_vars() 24 45 config_vars = distutils.sysconfig._config_vars 25 46 26 47 if sys.platform == 'sunos5': 27 48 config_vars['LDSHARED'] = "gcc -G" 28 49 config_vars['CCSHARED'] = "" 29 50 30 51 31 52 def uniq_arr(arr): … … 91 112 if not output: 92 113 if sys.platform=='win32': #From Simon Frost 93 #output = "gcc -L$MPICH_DIR\SDK.gcc\lib -lmpich -I$MPICH_DIR\SDK.gcc\include" 94 output = "gcc -LC:\MPICH2\lib -lmpi -IC:\MPICH2\include" 95 114 output = "gcc -L$MPICH_DIR\SDK.gcc\lib -lmpich -I$MPICH_DIR\SDK.gcc\include" 96 115 else: 97 116 output = "cc -L/usr/opt/mpi -lmpi -lelan" … … 127 146 if __name__ == "__main__": 128 147 setup_compiler() 129 148 130 149 mpi_flags = get_mpi_flags() 150 mpi_flags['inc_dirs'].append(numpy.get_include()) 131 151 132 152 133 # FIXME: It would be good to set specific compiler flags, e.g. 134 # for our AMD opteron cluster which is using the portland group 135 # compiler pgcc, but I can't get this to work let alone get distutils 136 # to give some diagnostics on what flags it is actually using. 153 # setting some extra compile flags for AMD64, utilizing 154 # distutils.sysconfig to check which compiler to use 137 155 if os.name == 'posix' and os.uname()[4] == 'x86_64': 138 156 #Extra flags for 64 bit architectures 139 #extra_compile_args = ' -fPIC -m64' #Valid for gcc 140 extra_compile_args = ' -fPIC -tp amd64' #Valid for pgcc 157 if 'pgcc' in distutils.sysconfig.get_config_var('CC'): 158 extra_compile_args = [' -fPIC -tp amd64'] #Valid for pgcc 159 elif 'gcc' in distutils.sysconfig.get_config_var('CC'): 160 extra_compile_args = [' -fPIC -m64'] #Valid for gcc 161 elif 'icc' in distutils.sysconfig.get_config_var('CC'): 162 extra_compile_args = [' -fPIC'] #Valid for icc 163 else: 164 extra_compile_args = None 141 165 else: 142 166 extra_compile_args = None 143 167 144 168 145 146 169 147 setup(name= "Pypar",148 version= "1.9.2",149 description= "Pypar - Parallel Python",150 long_description= "Pypar - Parallel Python, no-frills MPI interface",151 author= "Ole Nielsen",152 author_email= "Ole.Nielsen@anu.edu.au",153 url= "http://datamining.anu.edu.au/pypar",154 package_dir = {' ': 'lib'},170 setup(name='Pypar', 171 version=__version__, 172 description='Pypar - Parallel Python', 173 long_description='Pypar - Parallel Python, no-frills MPI interface', 174 author=__author__, 175 author_email='ole.moller.nielsen@gmail.com', 176 url='http://sourceforge.net/projects/pypar', 177 package_dir = {'pypar': ''}, # Use files in this dirctory 155 178 packages = ['pypar'], 156 179 ext_modules = [Extension('pypar.mpiext', 157 ['mpiext.c'], 180 ['mpiext.c'], 158 181 include_dirs=mpi_flags['inc_dirs'], 159 182 library_dirs=mpi_flags['lib_dirs'], … … 162 185 undef_macros=mpi_flags['undef_macros'], 163 186 extra_compile_args=extra_compile_args)] 164 187 )
Note: See TracChangeset
for help on using the changeset viewer.