3 added 403 characters in body edited Mar 17 '13 at 18:41 Mr.Wizard♦ 235k3030 gold badges488488 silver badges10901090 bronze badges In version 7 you will need to use use DistributeDefinitions for FftShift1D and eqn. Furthermore, as Szabolcs kindly explains in the comments you should be using DistributeDefinitions for the other symbols as well, instead of SetSharedVariable: DistributeDefinitions[FftShift1D, eqn, kxmin, kxmax, kxdiv, kxinc, zmin, zmax, zdiv, zinc, kspace];  With this your ParallelTable runs, and slightly faster than the non-parallel version, but not by a lot. Szabolcs suggests (in a comment) an optimization I haven't yet tried. A modified suggestion of Szabolcs's proves considerably faster: res2 = ParallelMap[FftShift1D @ Fourier @ N @ # &, kspace\[Transpose]];  In version 7 you will need to use use DistributeDefinitions for FftShift1D and eqn. Furthermore, as Szabolcs kindly explains in the comments you should be using DistributeDefinitions for the other symbols as well, instead of SetSharedVariable: DistributeDefinitions[FftShift1D, eqn, kxmin, kxmax, kxdiv, kxinc, zmin, zmax, zdiv, zinc, kspace];  With this your ParallelTable runs, and slightly faster than the non-parallel version, but not by a lot. Szabolcs suggests (in a comment) an optimization I haven't yet tried. In version 7 you will need to use use DistributeDefinitions for FftShift1D and eqn. Furthermore, as Szabolcs kindly explains in the comments you should be using DistributeDefinitions for the other symbols as well, instead of SetSharedVariable: DistributeDefinitions[FftShift1D, eqn, kxmin, kxmax, kxdiv, kxinc, zmin, zmax, zdiv, zinc, kspace];  With this your ParallelTable runs, and slightly faster than the non-parallel version, but not by a lot. A modified suggestion of Szabolcs's proves considerably faster: res2 = ParallelMap[FftShift1D @ Fourier @ N @ # &, kspace\[Transpose]];  2 added 403 characters in body edited Mar 17 '13 at 18:36 Mr.Wizard♦ 235k3030 gold badges488488 silver badges10901090 bronze badges In version 7 you will need to use use DistributeDefinitions for FftShift1D and eqn. Furthermore, as Szabolcs kindly explains in the comments you should be using DistributeDefinitions for the other symbols as well, instead of SetSharedVariable: DistributeDefinitions[FftShift1D, eqn]eqn, kxmin, kxmax, kxdiv, kxinc, zmin, zmax, zdiv, zinc, kspace];  This seems to be running very slowly howeverWith this your ParallelTable runs, whichand slightly faster than the non-parallel version, but not by a lot. Szabolcs suggests (in a comment) an optimization I am looking intohaven't yet tried. In version 7 you will need: DistributeDefinitions[FftShift1D, eqn]  This seems to be running very slowly however, which I am looking into. In version 7 you will need to use use DistributeDefinitions for FftShift1D and eqn. Furthermore, as Szabolcs kindly explains in the comments you should be using DistributeDefinitions for the other symbols as well, instead of SetSharedVariable: DistributeDefinitions[FftShift1D, eqn, kxmin, kxmax, kxdiv, kxinc, zmin, zmax, zdiv, zinc, kspace];  With this your ParallelTable runs, and slightly faster than the non-parallel version, but not by a lot. Szabolcs suggests (in a comment) an optimization I haven't yet tried. 1 answered Mar 17 '13 at 11:35 Mr.Wizard♦ 235k3030 gold badges488488 silver badges10901090 bronze badges In version 7 you will need: DistributeDefinitions[FftShift1D, eqn]  This seems to be running very slowly however, which I am looking into.