>I used the g77 compiler (p/o GCC-2.95) that comes with the Red Hat
>Linux 7.1 distribution CDs to compile NEC 4.1D. The g77 compiler
>options were those used by Jurgen Von Hagen in compiling NEC 2D (re
>ACES Newsletter Nov '98):
>
> g77 -O3 -fno-emulate-complex -funroll-loops nec41d.f
>
>While the compile process issued a couple of warnings about same name
>for global and intrinsic and array size, the compile completed
>without error.
I believe that the -fno-emulate-complex command line flag
is one of the options that has been reported to be broken
in g77. apparently when applied it causes various undeterminate
problems in the resulting executable.
(see http://gcc.gnu.org/ml/gcc-bugs/1999-07n/msg00430.html
for a short discussion on this)
Also, there have been a bunch of patches applied to various
versions of gcc relative to the -funroll-loops command
line flag. Seems that the optimization options associated
with gcc have been in a state of flux and some bugs still
exist.
>
>The problem was that the output results (antenna driving pt impedance
>& average gain) from a modeling run (there were no run time errors)
>were not consistent with those obtained with the same model on other
>UNIX and Windows platforms.
>
>I am using Red Hat 7.1 on a Panasonic Toughbook CF-27. Now, noticing
>a recent posting from Ray Anderson I tried compiling NEC 4.1 with
>
>g77 -O3 -fno-automatic nec41d.f
>
>and this worked. I'm not sure why Jurgen was using the
>-fno-emulate-complex instruction but that (not -funroll-loops)
>appears to be at the heart of the problem I was encountering.
>
The -fno-automatic command line option assures that
variables are passed across function calls. Without it,
data generated in a subroutine or function won't return
properly to the calling function. I particularly noted this
problem when compiling NEC2 in that data read in from a
SOMNEC file was being read correctly into the routine
that housed the file read, but then the data dissapeared
when that subroutine exited. -fno-automatic fixed that problem.
>The only other issue I have to resolve is that I if I compile NEC 4.1
>for more than 3500 segments (MAXSEG=3500, MAXMAT=3500) the NEC
>executable will cause a segmentation fault/core dump. Any thoughts
>in this area would certainly be welcome. Sincerely,
See the following URL:
http://www.nittany-scientific.com/faq/largemod.htm
For a discussion on some of the implications of compilation
executable for large model sizes.
-Ray Anderson
Staff SI Engineer
Sun Microsystems Inc.
-- The NEC-List mailing list <nec-list_at_gweep.ca> http://www.gweep.ca/mailman/listinfo.cgi/nec-listReceived on Tue Jun 04 2002 - 21:25:43 EDT
This archive was generated by hypermail 2.2.0 : Sat Oct 02 2010 - 00:10:42 EDT