Changeset 13b99fd in sasmodels for sasmodels/kerneldll.py
- Timestamp:
- Apr 27, 2016 12:34:42 PM (8 years ago)
- 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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/kerneldll.py
r639c4e3 r13b99fd 48 48 import sys 49 49 import os 50 from os.path import join as joinpath, split as splitpath, realpath, splitext 50 51 import tempfile 51 52 import ctypes as ct # type: ignore … … 86 87 else: 87 88 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 91 91 COMPILE = "gcc -shared -std=c99 -O2 -Wall %(source)s -o %(output)s -lm" 92 92 if "SAS_OPENMP" in os.environ: 93 93 COMPILE += " -fopenmp" 94 else: 95 from tinycc import TCC 96 COMPILE = TCC + " -shared -rdynamic -Wall %(source)s -o %(output)s" 94 97 else: 95 98 COMPILE = "cc -shared -fPIC -fopenmp -std=c99 -O2 -Wall %(source)s -o %(output)s -lm" 96 99 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. 101 DLL_PATH = joinpath(splitpath(realpath(sys.argv[0]))[0], "models") 99 102 100 103 ALLOW_SINGLE_PRECISION_DLLS = True … … 153 156 os.fdopen(fid, "w").write(source) 154 157 command = COMPILE%{"source":filename, "output":dll} 155 print("Compile command: "+command)156 158 status = os.system(command) 157 159 if status != 0 or not os.path.exists(dll):
Note: See TracChangeset
for help on using the changeset viewer.