Changeset e44432d in sasmodels for sasmodels/kerneldll.py
- Timestamp:
- Oct 19, 2018 5:46:26 PM (6 years ago)
- Branches:
- master, core_shell_microgels, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
- Children:
- be43e39
- Parents:
- 2586ab72
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/kerneldll.py
r6e7ba14 re44432d 99 99 pass 100 100 # pylint: enable=unused-import 101 102 # Compiler output is a byte stream that needs to be decode in python 3 103 decode = (lambda s: s) if sys.version_info[0] < 3 else (lambda s: s.decode('utf8')) 101 104 102 105 if "SAS_DLL_PATH" in os.environ: … … 184 187 subprocess.check_output(command, shell=shell, stderr=subprocess.STDOUT) 185 188 except subprocess.CalledProcessError as exc: 186 raise RuntimeError("compile failed.\n%s\n%s"%(command_str, exc.output)) 189 output = decode(exc.output) 190 raise RuntimeError("compile failed.\n%s\n%s"%(command_str, output)) 187 191 if not os.path.exists(output): 188 192 raise RuntimeError("compile failed. File is in %r"%source) … … 383 387 # leave room for f1/f2 results in case we need to compute beta for 1d models 384 388 nout = 2 if self.info.have_Fq else 1 385 # plus 3 weight, volume, radius386 self.result = np.empty(q_input.nq*nout + 3, self.dtype)389 # +4 for total weight, shell volume, effective radius, form volume 390 self.result = np.empty(q_input.nq*nout + 4, self.dtype) 387 391 self.real = (np.float32 if self.q_input.dtype == generate.F32 388 392 else np.float64 if self.q_input.dtype == generate.F64
Note: See TracChangeset
for help on using the changeset viewer.