473,386 Members | 1,738 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Bogus output on Wintel but good on SiliGee

I get bad results from a console-mode (no GUI), number-cruncher, C++
program when I run it on a Wintel box running Windows 2000 Pro, after
compiling it with Microsoft Visual C++. This very same code runs
correctly when run on a Silicon Graphics machine running IRIX 6.5,
after compiling it with the MIPSpro C++ compiler (CC).

The results on the Wintel machine are only a little off when running
in debug mode, but are total garbage when the release version is run.

Any ideas?
Jul 19 '05 #1
4 1625
"Bill" <Bi***********@SYColeman.com> wrote...
I get bad results from a console-mode (no GUI), number-cruncher, C++
program when I run it on a Wintel box running Windows 2000 Pro, after
compiling it with Microsoft Visual C++. This very same code runs
correctly when run on a Silicon Graphics machine running IRIX 6.5,
after compiling it with the MIPSpro C++ compiler (CC).

The results on the Wintel machine are only a little off when running
in debug mode, but are total garbage when the release version is run.

Any ideas?


The difference between release and debug versions of your program
is most likely due to the fact that MS compiler initialises all
variables to something meaningful in debug and leaves uninitialised
objects as is in release. So, check your code to see if you rely
on some variable being 0 upon creation. For example

double a;

leaves 'a' uninitialised. In debug mode MSVC++ will make it 0. In
release mode you get garbage in it. If you create some kind of
accumulator

double integral;
for (blahblah)
integral += some_formula();

then, since 'integral' has never been initialised to 0, you add to
some random value.

Of course, it could be something else...

Victor
Jul 19 '05 #2
> Any ideas?

Consult a psychic. You will get some answers.

Without any _minimal_ code from you that illustrates the problem, what can
we tell?

Stephen Howe
Jul 19 '05 #3
On 8/8/03 3:37 PM, in article
53**************************@posting.google.com, "Bill"
<Bi***********@SYColeman.com> wrote:
I get bad results from a console-mode (no GUI), number-cruncher, C++
program when I run it on a Wintel box running Windows 2000 Pro, after
compiling it with Microsoft Visual C++. This very same code runs
correctly when run on a Silicon Graphics machine running IRIX 6.5,
after compiling it with the MIPSpro C++ compiler (CC).

The results on the Wintel machine are only a little off when running
in debug mode, but are total garbage when the release version is run.

Any ideas?


Is there a possibility that the program is reading binary data files and
that the endianism is different?

Jul 19 '05 #4
In article <BB****************@nottelling.com>, no**@nottelling.com
says...

[ ... ]
The results on the Wintel machine are only a little off when running
in debug mode, but are total garbage when the release version is run.

Any ideas?


Is there a possibility that the program is reading binary data files and
that the endianism is different?


Minimal -- if the problem was in the data file, chances are that there
would be little or no variation between debug and release modes on the
same machine.

--
Later,
Jerry.

The universe is a figment of its own imagination.
Jul 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Luke | last post by:
Hi, I'm getting an OverflowError which doesn't make sense to me. Is this a python bug? Traceback (most recent call last): File "/home/demoau/lib/py/omniORB/__init__.py", line 717, in...
4
by: Ellarco | last post by:
How can I perform output (file output for the monent, possibly socket in the future) in such a way that output produced on different compiler/machines pairs is indistinguishable? Specifically my...
1
by: Ha | last post by:
I found an article (see link below) that states that xml elements can be order independent by removing the commas in the DTD. Ex: (notice no comma between NAME and EMAIL) <!ELEMENT CONTACT (NAME...
0
by: Igor | last post by:
Hi all! As many of you, I have a big VB.NET solution and quite often get bogus build errors out of the blue. This isn't declared, that is not a property of some shit and so on... It's very...
22
by: bq | last post by:
Hello, Two questions related to floating point support: What C compilers for the wintel (MS Windows + x86) platform are C99 compliant as far as <math.h> and <tgmath.h> are concerned? What...
4
by: jelle | last post by:
Hi, I dearly miss having the power of SciPy on my python 2.4 installation. The topic of SciPy python 2.4 wintel binaries has been discussed before on this list, but I haven't been able to find a...
5
by: Tiger | last post by:
Hi, I try to send a packet with raw socket but I have an error with ethereal sniffer on windows xp. I can't find any solution on the net. :( Could anybody help with that problem? my code :...
6
by: =?Utf-8?B?QkJN?= | last post by:
Hi, I have an app that is crashing due to a System.ArgumentException. At this point it's just a simple app to test some basic object values. The main app is a Windows App that looks like...
4
by: suresh | last post by:
Hi, I am getting zero as value for some keys in my map which can never happen as per my understanding of my code. These are the details: I have defined an array of vectors, where each vector...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.