Changes in sasmodels/kerneldll.py [bf94e6e:1a3559f] in sasmodels
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/kerneldll.py
rbf94e6e r1a3559f 99 99 pass 100 100 # pylint: enable=unused-import 101 102 if "SAS_DLL_PATH" in os.environ: 103 SAS_DLL_PATH = os.environ["SAS_DLL_PATH"] 104 else: 105 # Assume the default location of module DLLs is in .sasmodels/compiled_models. 106 SAS_DLL_PATH = os.path.join(os.path.expanduser("~"), ".sasmodels", "compiled_models") 101 107 102 108 if "SAS_COMPILER" in os.environ: … … 123 129 # add openmp support if not running on a mac 124 130 if sys.platform != "darwin": 125 CC.append("-fopenmp") 131 # OpenMP seems to be broken on gcc 5.4.0 (ubuntu 16.04.9) 132 # Shut it off for all unix until we can investigate. 133 #CC.append("-fopenmp") 134 pass 126 135 def compile_command(source, output): 127 136 """unix compiler command""" … … 158 167 return CC + [source, "-o", output, "-lm"] 159 168 160 # Assume the default location of module DLLs is in .sasmodels/compiled_models.161 DLL_PATH = os.path.join(os.path.expanduser("~"), ".sasmodels", "compiled_models")162 163 169 ALLOW_SINGLE_PRECISION_DLLS = True 164 170 … … 197 203 return path 198 204 199 return joinpath( DLL_PATH, basename)205 return joinpath(SAS_DLL_PATH, basename) 200 206 201 207 … … 206 212 exist yet if it hasn't been compiled. 207 213 """ 208 return os.path.join( DLL_PATH, dll_name(model_info, dtype))214 return os.path.join(SAS_DLL_PATH, dll_name(model_info, dtype)) 209 215 210 216 … … 225 231 models are not allowed as DLLs. 226 232 227 Set *sasmodels.kerneldll.DLL_PATH* to the compiled dll output path. 233 Set *sasmodels.kerneldll.SAS_DLL_PATH* to the compiled dll output path. 234 Alternatively, set the environment variable *SAS_DLL_PATH*. 228 235 The default is in ~/.sasmodels/compiled_models. 229 236 """ … … 244 251 if need_recompile: 245 252 # Make sure the DLL path exists 246 if not os.path.exists( DLL_PATH):247 os.makedirs( DLL_PATH)253 if not os.path.exists(SAS_DLL_PATH): 254 os.makedirs(SAS_DLL_PATH) 248 255 basename = splitext(os.path.basename(dll))[0] + "_" 249 256 system_fd, filename = tempfile.mkstemp(suffix=".c", prefix=basename)
Note: See TracChangeset
for help on using the changeset viewer.