Re: Interpolation -> segfault?
- To: mathgroup at smc.vnet.net
- Subject: [mg98178] Re: Interpolation -> segfault?
- From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
- Date: Wed, 1 Apr 2009 05:58:07 -0500 (EST)
- Organization: Uni Leipzig
- References: <gqsn0r$3mf$1@smc.vnet.net>
- Reply-to: kuska at informatik.uni-leipzig.de
Hi, your InterpolationFunction[] cause the kernel crash and it would helpful to find out where it come from .. The input seems to be nonsense and it is no wonder that the kernel crashes. Especial ff = InterpolatingFunction[{{-1., 2.}}, {3, 3, 0, {136}, {4}, 0, 0, 0, 0}, {{-1., -0.75, -0.5, -0.25, -0.125, 0., 0.125, 0.15625, 0.1875, 0.21875, 0.234375, 0.25, 0.265625, 0.273438, 0.28125, 0.289063, 0.296875, 0.304688, 0.3125, 0.320313, 0.328125, 0.335938, 0.34375, 0.351563, 0.359375, 0.367188, 0.375, 0.382813, 0.390625, 0.398438, 0.40625, 0.414063, 0.421875, 0.429688, 0.4375, 0.445313, 0.453125, 0.460938, 0.46875, 0.476563, 0.484375, 0.492188, 0.5, 0.507813, 0.515625, 0.523438, 0.53125, 0.539063, 0.546875, 0.554688, 0.5625, 0.570313, 0.578125, 0.585938, 0.59375, 0.601563, 0.609375, 0.617188, 0.625, 0.632813, 0.640625, 0.648438, 0.65625, 0.664063, 0.671875, 0.679688, 0.6875, 0.695313, 0.703125, 0.710938, 0.71875, 0.726563, 0.734375, 0.742188, 0.75, 0.757813, 0.765625, 0.773438, 0.78125, 0.789063, 0.796875, 0.804688, 0.8125, 0.820313, 0.828125, 0.835938, 0.84375, 0.851563, 0.859375, 0.867188, 0.875, 0.882813, 0.890625, 0.898438, 0.90625, 0.914063, 0.921875, 0.929688, 0.9375, 0.945313, 0.953125, 0.960938, 0.96875, 0.976563, 0.984375, 0.992188, 1., 1.00781, 1.01563, 1.02344, 1.03125, 1.03906, 1.04688, 1.05469, 1.0625, 1.07031, 1.07813, 1.08594, 1.09375, 1.10156, 1.10938, 1.11719, 1.125, 1.13281, 1.14063, 1.14844, 1.15625, 1.17188, 1.1875, 1.20313, 1.21875, 1.23438, 1.25, 1.5, 1.75, 2.}}, {Developer`PackedArrayForm, {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136}, {0., 0., 1.839556450000000*10^-316, 1.21549*10^-159, 2.31335*10^-101, 1.67253*10^-56, 4.5936*10^-25, 2.66022*10^-19, 2.23311*10^-14, 2.71726*10^-10, 1.4528*10^-8, 4.79291*10^-7, 9.75747*10^-6, 0.0000367374, 0.000122606, 0.000362738, 0.000951569, 0.00221421, 0.00457332, 0.00839564, 0.0137329, 0.0201077, 0.0265815, 0.0322166, 0.0367286, 0.0408717, 0.0462177, 0.0544092, 0.0663, 0.0813791, 0.0976722, 0.112228, 0.122235, 0.126523, 0.126732, 0.127295, 0.133834, 0.150431, 0.177017, 0.208434, 0.236308, 0.253376, 0.257998, 0.255774, 0.256824, 0.270362, 0.300085, 0.342984, 0.391402, 0.436275, 0.469696, 0.486402, 0.484727, 0.467353, 0.441479, 0.41775, 0.407822, 0.421313, 0.4633, 0.533418, 0.626979, 0.737778, 0.861279, 0.996289, 1.1438, 1.30339, 1.46955, 1.63063, 1.77232, 1.8848, 1.96966, 2.04154, 2.1219, 2.2277, 2.36187, 2.51091, 2.65028, 2.7539, 2.80324, 2.79347, 2.7351, 2.65062, 2.56727, 2.50909, 2.49206, 2.52399, 2.60708, 2.73955, 2.91432, 3.11604, 3.32016, 3.49681, 3.61939, 3.67374, 3.66173, 3.59611, 3.48923, 3.34377, 3.15256, 2.90785, 2.61315, 2.28878, 1.96732, 1.68224, 1.45678, 1.29843, 1.20019, 1.14535, 1.11267, 1.08029, 1.02917, 0.946603, 0.829484, 0.685201, 0.529164, 0.379515, 0.25137, 0.15301, 0.0852144, 0.0432423, 0.0199185, 0.00829953, 0.00311858, 0.00105388, 0.000319547, 0.0000867615, 0.0000210592, 8.81696*10^-7, 2.32524*10^-8, 3.8403*10^-10, 3.95627*10^-12, 2.53536*10^-14, 1.00878*10^-16, 1.67729*10^-83, 7.17379*10^-204, 0.}}, {Automatic}]; and ff["ValuesOnGrid"] gives non numeric output. Regards Jens oshaughn wrote: > Hello, > > I generated and saved the following interpolating function (and > wrapper). Whenever I evaluate it, I immediately get a segfault in V7 > and V6. > > Could someone let me know why this is, why the code that generated it > doesn't segfault, and what I should do to avoid segfault issues in the > future? > > fn = If[#1 > 0.1 && #1 < > 10^2, (1/(#1 Log[10])) InterpolatingFunction[{{-1., 2.}}, {3, 3, > 0, {136}, {4}, 0, 0, 0, > 0}, {{-1., -0.75, -0.5, -0.25, -0.125, 0., 0.125, 0.15625, > 0.1875, 0.21875, 0.234375, 0.25, 0.265625, 0.273438, 0.28125, > 0.289063, 0.296875, 0.304688, 0.3125, 0.320313, 0.328125, > 0.335938, 0.34375, 0.351563, 0.359375, 0.367188, 0.375, > 0.382813, 0.390625, 0.398438, 0.40625, 0.414063, 0.421875, > 0.429688, 0.4375, 0.445313, 0.453125, 0.460938, 0.46875, > 0.476563, 0.484375, 0.492188, 0.5, 0.507813, 0.515625, > 0.523438, 0.53125, 0.539063, 0.546875, 0.554688, 0.5625, > 0.570313, 0.578125, 0.585938, 0.59375, 0.601563, 0.609375, > 0.617188, 0.625, 0.632813, 0.640625, 0.648438, 0.65625, > 0.664063, 0.671875, 0.679688, 0.6875, 0.695313, 0.703125, > 0.710938, 0.71875, 0.726563, 0.734375, 0.742188, 0.75, > 0.757813, 0.765625, 0.773438, 0.78125, 0.789063, 0.796875, > 0.804688, 0.8125, 0.820313, 0.828125, 0.835938, 0.84375, > 0.851563, 0.859375, 0.867188, 0.875, 0.882813, 0.890625, > 0.898438, 0.90625, 0.914063, 0.921875, 0.929688, 0.9375, > 0.945313, 0.953125, 0.960938, 0.96875, 0.976563, 0.984375, > 0.992188, 1., 1.00781, 1.01563, 1.02344, 1.03125, 1.03906, > 1.04688, 1.05469, 1.0625, 1.07031, 1.07813, 1.08594, 1.09375, > 1.10156, 1.10938, 1.11719, 1.125, 1.13281, 1.14063, 1.14844, > 1.15625, 1.17188, 1.1875, 1.20313, 1.21875, 1.23438, 1.25, > 1.5, 1.75, 2.}}, {Developer`PackedArrayForm, {0, 1, 2, 3, 4, > 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, > 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, > 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, > 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, > 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, > 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, > 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, > 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, > 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, > 133, 134, 135, 136}, {0., 0., 1.839556450000000*10^-316, > 1.21549*10^-159, 2.31335*10^-101, 1.67253*10^-56, > 4.5936*10^-25, 2.66022*10^-19, 2.23311*10^-14, > 2.71726*10^-10, 1.4528*10^-8, 4.79291*10^-7, 9.75747*10^-6, > 0.0000367374, 0.000122606, 0.000362738, 0.000951569, > 0.00221421, 0.00457332, 0.00839564, 0.0137329, 0.0201077, > 0.0265815, 0.0322166, 0.0367286, 0.0408717, 0.0462177, > 0.0544092, 0.0663, 0.0813791, 0.0976722, 0.112228, 0.122235, > 0.126523, 0.126732, 0.127295, 0.133834, 0.150431, 0.177017, > 0.208434, 0.236308, 0.253376, 0.257998, 0.255774, 0.256824, > 0.270362, 0.300085, 0.342984, 0.391402, 0.436275, 0.469696, > 0.486402, 0.484727, 0.467353, 0.441479, 0.41775, 0.407822, > 0.421313, 0.4633, 0.533418, 0.626979, 0.737778, 0.861279, > 0.996289, 1.1438, 1.30339, 1.46955, 1.63063, 1.77232, 1.8848, > 1.96966, 2.04154, 2.1219, 2.2277, 2.36187, 2.51091, 2.65028, > 2.7539, 2.80324, 2.79347, 2.7351, 2.65062, 2.56727, 2.50909, > 2.49206, 2.52399, 2.60708, 2.73955, 2.91432, 3.11604, > 3.32016, 3.49681, 3.61939, 3.67374, 3.66173, 3.59611, > 3.48923, 3.34377, 3.15256, 2.90785, 2.61315, 2.28878, > 1.96732, 1.68224, 1.45678, 1.29843, 1.20019, 1.14535, > 1.11267, 1.08029, 1.02917, 0.946603, 0.829484, 0.685201, > 0.529164, 0.379515, 0.25137, 0.15301, 0.0852144, 0.0432423, > 0.0199185, 0.00829953, 0.00311858, 0.00105388, 0.000319547, > 0.0000867615, 0.0000210592, 8.81696*10^-7, 2.32524*10^-8, > 3.8403*10^-10, 3.95627*10^-12, 2.53536*10^-14, > 1.00878*10^-16, 1.67729*10^-83, 7.17379*10^-204, > 0.}}, {Automatic}][Log[10, #1]], 0] &; >