Changeset aab3d87 in sasmodels for sasmodels/kerneldll.py


Ignore:
Timestamp:
May 27, 2016 10:47:16 AM (8 years ago)
Author:
Paul Kienzle <pkienzle@…>
Branches:
master, core_shell_microgels, costrafo411, magnetic_model, release_v0.94, release_v0.95, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
30f8863
Parents:
197e41d
Message:

tag model dlls with x86 or amd64 on windows to avoid future conflicts from a 64-bit release

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/kerneldll.py

    raa343d6 raab3d87  
    6262 
    6363if os.name == 'nt': 
     64    ARCH = "amd64" if sys.maxint > 2**32 else "x86"  # maxint=2**31-1 on 32 bit 
    6465    # Windows compiler; check if TinyCC is available 
    6566    try: 
     
    9596            return CC + ["%s"%source, "-o", "%s"%output, "-lm"] 
    9697else: 
     98    ARCH = "" 
    9799    # Generic unix compile 
    98100    # On mac users will need the X code command line tools installed 
     
    142144 
    143145    # Hack to find precompiled dlls 
    144     path = joinpath(generate.DATA_PATH, '..', 'compiled_models', basename+'.so') 
     146    path = joinpath(generate.DATA_PATH, '..', 'compiled_models', 
     147                    basename + ARCH + '.so') 
    145148    if os.path.exists(path): 
    146149        return path 
     
    176179        dtype = generate.F64  # Force 64-bit dll 
    177180 
     181    # File name for generated C code 
    178182    if dtype == generate.F32: # 32-bit dll 
    179183        tempfile_prefix = 'sas_' + model_info['name'] + '32_' 
Note: See TracChangeset for help on using the changeset viewer.