X-Spam-Check-By: sourceware.org X-YMail-OSG: QSOmc20VM1nnS7C.TznJOHExQun7RsoO.84Zq9.zlVxXS3chTQSgHX9ODPPOHpk3Fg-- X-Mailer: YahooMailRC/368.8 YahooMailWebService/0.6.132.8 Date: Thu, 15 Feb 2007 13:02:17 -0800 (PST) From: winner wei Subject: Re: is there any little-endian and big-endian issue with cygwin? To: Igor Peshansky Cc: cygwin AT cygwin DOT com MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="0-109371482-1171573337=:79788" Message-ID: <804963.79788.qm@web32401.mail.mud.yahoo.com> X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com --0-109371482-1171573337=:79788 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Thanks, Igor.=20 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 (GU= I) will summarize your selections, at this point, we can either save this i= nto a parameter file for later use (quit this run, not quit GUI) or just co= ntinue to launch the executable immediately from the GUI (your selections i= s 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 To: winner wei Cc: cygwin AT cygwin DOT com Sent: Thursday, February 15, 2007 2:22:33 PM Subject: Re: is there any little-endian and big-endian issue with cygwin? David, . Thanks. Also, reformatted. And again: . On Thu, 15 Feb 2007, winner wei wrote: > ----- Original Message ---- > From: Igor Peshansky > To: winner wei > Cc: cygwin AT XXXXXX DOT XXX . 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 > > . > > 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 --=20 http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_ pechtcha AT cs DOT nyu DOT edu | igor AT watson DOT ibm DOT com 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 =20 ___________________________________________________________________________= _________ No need to miss a message. Get email on-the-go=20 with Yahoo! Mail for Mobile. Get started. http://mobile.yahoo.com/mail=20 --0-109371482-1171573337=:79788 Content-Type: text/plain; name="=?utf-8?q?misr=5Fparam5x?=" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="=?utf-8?q?misr=5Fparam5x?=" Ck5VTV9SVU5TID0gMQoKQkVHSU4KSU5QVVRfRklMRU5BTUUgPSBDOlxIRUdf ZGF0YVxNSVNSX0FNMV9BU19BRVJPU09MX1AwMzlfTzAyMzY3MF9GMDdfMDAx NS5oZGYKT0JKRUNUX05BTUUgPSBSZWdQYXJhbXNBZXJ8CkZJRUxEX05BTUUg PSBSZWdCZXN0RXN0aW1hdGVTcGVjdHJhbE9wdERlcHRofApCQU5EX05VTUJF UiA9IDEKQkFORF9OQU1FID0gU09NQmxvY2tEaW0KRk9VUlRIX0RJTSA9IDEK Rk9VUlRIX0RJTV9OQU1FID0gTkJhbmREaW0KU1BBVElBTF9TVUJTRVRfVUxf Q09STkVSID0gKCA1MC4yIC0xMTMuNyApClNQQVRJQUxfU1VCU0VUX0xSX0NP Uk5FUiA9ICggNDQuNSAtMTA4LjMgKQpSRVNBTVBMSU5HX1RZUEUgPSBOTgpP VVRQVVRfUFJPSkVDVElPTl9UWVBFID0gR0VPCkVMTElQU09JRF9DT0RFID0g V0dTODQKVVRNX1pPTkUgPSAwCk9VVFBVVF9QUk9KRUNUSU9OX1BBUkFNRVRF UlMgPSAoIDAuMCAwLjAgMC4wIDAuMCAwLjAgMC4wIDAuMCAwLjAgMC4wIDAu MCAwLjAgMC4wIDAuMCAwLjAgMC4wICApCk9VVFBVVF9QSVhFTF9TSVpFX1gg PSAxNzYwMC4wCk9VVFBVVF9QSVhFTF9TSVpFX1kgPSAxNzYwMC4wCk9VVFBV VF9GSUxFTkFNRSA9IEM6XEhFR19kYXRhXE1JU1JfQU0xX0FTX0FFUk9TT0xf UDAzOV9PMDIzNjcwX0YwN18wMDE1X1JlZ1BhcmFtc0Flcl81eG5uUTMuaGRm Ck9VVFBVVF9UWVBFID0gSERGRU9TCkVORAoK --0-109371482-1171573337=:79788 Content-Type: text/plain; charset=us-ascii -- 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/ --0-109371482-1171573337=:79788--