Some unsolicited comments on the code. You probably want to change line 118 and 119 to
sxloc = trunc(Int, mxnx / 2) szloc = trunc(Int, mxnz / 2) so that they really are ints, Without the "Int" it will still be a float. As a base line, your code for me ran in 1.239 seconds. Adding "@inbounds" on line 127 takes this down to 0.75 seconds. Adding "@fastmath" on the same line reduces it further down to 0.52 seconds. Normal caveats for fastmath of course applies. // Kristoffer On Sunday, October 11, 2015 at 9:32:04 PM UTC+2, Alain Clo wrote: > > See attached the updated code ( slight modifications, code embedded into a > function acoustic(), and some loops interchanged). > To see some images, uncomment at the end of the code. > Enjoy ! > Alain > Le dimanche 11 octobre 2015 21:30:43 UTC+3, Kristoffer Carlsson a écrit : >> >> Maybe you can give a link to the updated code? > >