Changeset 13b99fd in sasmodels for sasmodels/kerneldll.py


Ignore:
Timestamp:
Apr 27, 2016 12:34:42 PM (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:
da63656
Parents:
ed246ab (diff), fb69211 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' into polydisp

Conflicts:

.gitignore
sasmodels/kerneldll.py

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/kerneldll.py

    r639c4e3 r13b99fd  
    4848import sys 
    4949import os 
     50from os.path import join as joinpath, split as splitpath, realpath, splitext 
    5051import tempfile 
    5152import ctypes as ct  # type: ignore 
     
    8687        else: 
    8788            COMPILE = " ".join((CC, LN)) 
    88     else: 
    89         # fPIC is unused on windows 
    90         # COMPILE = "gcc -shared -fPIC -std=c99 -O2 -Wall %(source)s -o %(output)s -lm" 
     89    elif True:  # Don't use mingw 
     90        # fPIC is not needed on windows 
    9191        COMPILE = "gcc -shared -std=c99 -O2 -Wall %(source)s -o %(output)s -lm" 
    9292        if "SAS_OPENMP" in os.environ: 
    9393            COMPILE += " -fopenmp" 
     94    else: 
     95        from tinycc import TCC 
     96        COMPILE = TCC + " -shared -rdynamic -Wall %(source)s -o %(output)s" 
    9497else: 
    9598    COMPILE = "cc -shared -fPIC -fopenmp -std=c99 -O2 -Wall %(source)s -o %(output)s -lm" 
    9699 
    97 # Assume the default location of module DLLs is within the sasmodel directory. 
    98 DLL_PATH = os.path.join(os.path.split(os.path.realpath(__file__))[0], "models", "dll") 
     100# Assume the default location of module DLLs is in top level /models dir. 
     101DLL_PATH = joinpath(splitpath(realpath(sys.argv[0]))[0], "models") 
    99102 
    100103ALLOW_SINGLE_PRECISION_DLLS = True 
     
    153156        os.fdopen(fid, "w").write(source) 
    154157        command = COMPILE%{"source":filename, "output":dll} 
    155         print("Compile command: "+command) 
    156158        status = os.system(command) 
    157159        if status != 0 or not os.path.exists(dll): 
Note: See TracChangeset for help on using the changeset viewer.