Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #11187
| From | Axel <axel.kowald@gmail.com> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Strange runtime error in Compiled function |
| Date | 2012-08-03 08:19 +0000 |
| Message-ID | <jvg1i7$rkd$1@smc.vnet.net> (permalink) |
| Organization | Time-Warner Telecom |
Hi everybody,
I'm using Mathematica 8.0.1 on a 32bit Win7 system and I have strange problems with the Compile function.
I have this simple function:
compileTestC = Compile[{{paramList, _Integer, 1}},
Module[{a, b},
Print[paramList[[1]]];
a = paramList[[1]];
If[False,
b = 1,
b = 0
] ;
Return[5]
]
] ;
When I compile and run it the first time, it produces the expected results:
compileTestC[{100}]
100
5
But for all subsequent calls I get this strange error message:
compileTestC[{100}]
100
CompiledFunction::cflist: Nontensor object generated; proceeding with uncompiled evaluation. >>
100
5
Furthermore, small changes to the source code make the error disappear.
For instance deleting the line "a = paramList[[1]];" or deleting the If statement.
This sounds really crazy for me and I have no idea what's going on.
Can anybody help ? Maybe it's a bug in Mathematica ?
Thanks,
Axel
Back to comp.soft-sys.math.mathematica | Previous | Next — Next in thread | Find similar | Unroll thread
Strange runtime error in Compiled function Axel <axel.kowald@gmail.com> - 2012-08-03 08:19 +0000
Re: Strange runtime error in Compiled function Frank K <fkampas@gmail.com> - 2012-08-04 10:05 +0000
Re: Strange runtime error in Compiled function Axel <axel.kowald@gmail.com> - 2012-08-05 01:56 +0000
Re: Strange runtime error in Compiled function David Bailey <dave@removedbailey.co.uk> - 2012-08-05 01:54 +0000
Re: Strange runtime error in Compiled function Axel <axel.kowald@gmail.com> - 2012-08-06 08:49 +0000
csiph-web