Subject: Re: is there any little-endian and big-endian issue with cygwin?
From: winner wei <[email-masked]>
To: Igor Peshansky <[email-masked]>
Cc: [email-masked]
Date: Thu, 15 Feb 2007 13:02:17 -0800 (PST)
List-Id: <cygwin.cygwin.com>

Thanks, Igor. 

Attached is a copy of my parameter file. I got it this way:
The GUI works as an interface to let you type in input file and output file name, also some other parameters, when you finish those selections, it (GUI) will summarize your selections, at this point, we can either save this into a parameter file for later use (quit this run, not quit GUI) or just continue to launch the executable immediately from the GUI (your selections is saved as a temp. file and discarded after run). The saved param. file can be used for command line run without any changes to it (or as a template).

Thanks.

----- Original Message ----
From: Igor Peshansky <[email-masked]>
To: winner wei <[email-masked]>
Cc: [email-masked]
Sent: Thursday, February 15, 2007 2:22:33 PM
Subject: Re: is there any little-endian and big-endian issue with cygwin?

David,

<http://cygwin.com/acronyms/#PPIOSPE>.  Thanks.
Also, <http://cygwin.com/acronyms/#TOFU> reformatted.
And again: <http://cygwin.com/acronyms/#PCYMTWLL>.

On Thu, 15 Feb 2007, winner wei wrote:

> ----- Original Message ----
> From: Igor Peshansky <[email-masked]>
> To: winner wei <[email-masked]>
> Cc: [email-masked]

<http://cygwin.com/acronyms/#PCYMTNQREAIYR>.  Thanks.

> > On Thu, 15 Feb 2007, winner wei wrote:
> >
> > > My code works fine in Cygwin by command line, but when I run it
> > > through a Java GUI launched from DOS the result is incorrect with
> > > all the data which are not zero. The java Gui does nothing more than
> > > launching the executables and provide a parameter file (I used the
> > > exactly same parameter file by the command line run). So I guess if
> > > there is any differences in the storage arrangement btw Cygwin and
> > > DOS/Windows, or any other reason?
> >
> > Endianness is usually a property of the architecture[*].  Since both
> > Cygwin and Windows run on the same architecture, there are no endianness
> > issues.
> >
> > However, Cygwin and Windows do have different formats for filesystem
> > paths, and may also have different concepts of line endings.  You need
> > to make sure that the path your Cygwin executable gets is in the
> > format that Cygwin understands.  If that is not your problem, you'll
> > need to provide more details, and perhaps a
> > <http://cygwin.com/acronyms/#STC>.
> >     Igor
> > [*] Yes, I know, except for special cases like network data layout, but
> > we're not considering those here.
>
> Thank you very much, Igor. Here are two things I don't understand:
>
> 1, I haven't found a problem with path format at this point, suppose
> there is one, why did command line run worked fine while the Java Gui
> didn't?

You have not provided enough information about how exactly you specify the
path to the data file.  For all I know, you may be invoking the program on
the command line with POSIX-style path, and using java.io.File mechanisms
to generate the path in your Java program -- that would definitely cause a
path mismatch.  But with the amount of detail you provided, we just don't
know.  You could try instrumenting the executable to print out the path to
the data file it's getting.

> 2, the parameter file (to the executable) provides input file name (hdf
> format file), output file name, geographic coverage, warping method and
> some other auxilliary data. when the code runs incorrectly, the data
> points would have data like NaN, x.xE-38, I am not sure if you need more
> to make some judges.

You mentioned before that you provide the same file in both cases.  Is
that file generated anew every time, or is it a pre-existing file on disk?
All of your previous input seemed to indicate the latter, in which case
Java's representation of numbers should not be an issue.

> By the way, I just saw another response to my question by Tim, he said
> that Java uses big-endian and dos/win (cygwin) use little endian, do you
> think it explained the reason? Thanks again.

Again, if you re-generate the file, then Java's endianness may be the
reason (I forgot that Java mandates big-endian representation in the spec
for DataOutputStream).  However, since you did not provide any details
about how the numbers are written to the file, etc, we can only guess.
    Igor
-- 
                http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_        [email-masked] | [email-masked]
ZZZzz /,`.-'`'    -.  ;-;;,_        Igor Peshansky, Ph.D. (name changed!)
     |,4-  ) )-,_. ,\ (  `'-'        old name: Igor Pechtchanski
    '---''(_/--'  `-'\_) fL    a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

Freedom is just another word for "nothing left to lose"...  -- Janis Joplin

 
____________________________________________________________________________________
No need to miss a message. Get email on-the-go 
with Yahoo! Mail for Mobile. Get started.
http://mobile.yahoo.com/mail 

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/