View Single Post
  #3   Report Post  
Old September 24th 07, 01:28 AM posted to rec.radio.amateur.antenna
[email protected] jimlux@earthlink.net is offline
external usenet poster
 
First recorded activity by RadioBanter: Jan 2007
Posts: 61
Default Speedup NEC-Engine, using multiple CPU-Cores

On Sep 23, 12:34 pm, wrote:
Has anybody a solution to speedup the NEC-Engine, using multiple CPU-
Cores?
In standard use, only one NEC-Engine is running. The NEC-Engine does
not use multi-threading technique and therefore only one CPU-Core is
running.


The NEC engine calls standard matrix math routines, so one can replace
the libraries with a multicore library (or, even, with a MPI based
cluster library). This can help a lot on huge models (thousands of
segments)


Todays computers have multiple cores. Even I am using one with two
cores (Intel Dual-Core). And there are more cores available in the
future (3,4 and more).

My question is, is threre a solution for speeding up the antenna
calculation using NEC2/4-Engine? If not, I plan to code a wrapper NEC-
Engine, that is able to busy all CPU-Cores and merging the results to
one output file. Especially antenna calculation can be easly divided
into multiple parts (eg. radiation pattern division). If there is a
solution, I do not want to reinvent the tire again.


Or when you're doing multiple frequencies.

The NEC engine does things in several chunks:
a) building the matrix from all the geometry, including the coupling
between segments -this is frequency dependent
b) solving the matrix for the segment currents - this is a
straightforward (but time consuming) linear equation solving process
c) calculating the field by integrating all the segment currents -
this is independent among the az/el's or near field points in the
output.

So there's opportunities for parallelism in each of the three chunks,
some of which are almost embarassingly parallel (EP).
a) if you're doing an analysis at multiple frequencies, running each
frequency on a separate machine/core is a great idea, since they're
essentially independent.
b) as you suggested, breaking up the output computation (c, above) is
a natural
c) using a multicore or cluster matrix math package can help with b,
above.


Whatever you do, you should seriously contemplate basing your work on
the NEC4 engine, rather than the older NEC 2 engine. Sure, you'll
have to pay for it, but it's structured better for what you want to
do, and more accurate to boot.