This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: G++ 4.3.4 vs.G++ 4.5.2???


First, I tried "-march=pentium3 -mfpmath=sse" to no avail - same wrong
answer.  The is a "rigid plate" analysis for a vibration problem.  The
correct answer is the plate lattice damps out at -0.414329 @ ~0.5
seconds.   With G++ 4.3.4 I'm now getting:  -0.43281 @ ~0.9 seconds.

Second, I'm simply compiling the source code using g++ <source-file>,
the only option "-g".

---Jan

On Mon, Jun 13, 2011 at 6:54 AM, Jonathan Wakely <jwakely.gcc@gmail.com> wrote:
> On 13 June 2011 11:24, Jan Chludzinski wrote:
>> Just finished compiling some numerical code (developed using the
>> Borland C++ compiler) using G++ 4.3.4 (that came with Cygwin 1.7). The
>> answers are different from what I get using the Borland compiler
>> (circa 2002). ?I have known correct answers from some NASA code and
>> compare against those.
>>
>> I've transitioned of late to Code::Blocks using the latest MinGW.
>> MinGW comes with G++ 4.5.2. ?I compiled using this compiler and it
>> once again works (I get the same answers as the NASA code).
>>
>> Are there known problems with G++ 4.3.4?
>>
>> BTW, the original code was infinite looping until I replaced the old style:
>>
>> for (i=0; i<WHATEVER; i++) ..
>>
>> with i declared within the routine (i.e., function) with:
>>
>> for (int i=0; i<WHATEVER; i++) ...
>
> Are you using x86? Are you telling the compiler to use SSE registers
> for floating point instead of the 387 registers?
>
> Does using "-march=pentium3 -mfpmath=sse" with GCC 4.3.4 give the
> expected results?
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]