Guest User

Untitled

a guest
Nov 24th, 2017
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. (* ::Package:: *)
  2.  
  3. (* ::Input::Initialization:: *)
  4.  
  5. Needs["SubKernels`RemoteKernels`"];
  6. numCore=32;
  7. PBSKernel[host_String]:= LaunchKernels[RemoteMachine[host,"ssh -x -f -l `3` `1` /cm/shared/apps/Mathematica_10.0.1/Executables/math-mathlink -linkmode Connect `4` -linkname '`2`' -subkernel-noinit",numCore]];
  8. hostfile = Environment["PBS_NODEFILE"];
  9.  
  10. (* ::Input::Initialization:: *)
  11.  
  12. ParallelEvaluate[
  13.  
  14. "initialising variables"
  15.  
  16. ];
  17.  
  18.  
  19. (* ::Input::Initialization:: *)
  20.  
  21. Do[
  22.  
  23. b1 = ParallelTable[NIntegrate[func[x,i,j],{x,0,20}],{i,1,100},Method->"FinestGrained"];
  24.  
  25. b1interp = Interpolation[b1];
  26. ParallelEvaluate[ToString[b1interp]];
  27. DistributeDefinitions[b1interp];
  28.  
  29. b2 = ParallelTable[NIntegrate[b1interp[x,i,j],{x,0,20}],{i,1,100},Method->"FinestGrained"];
  30. .
  31. .
  32. .
  33.  
  34. ,{j,1,100}
  35.  
  36. ]
  37.  
  38.  
  39. (* ::Input::Initialization:: *)
  40.  
  41. Exit[]
Add Comment
Please, Sign In to add comment