charm AT lists.siebelschool.illinois.edu
Subject: Charm++ parallel programming system
List archive
- From: Tom Quinn <trq AT astro.washington.edu>
- To: Shad Kirmani <sxk5292 AT cse.psu.edu>
- Cc: charm AT cs.uiuc.edu, cosmology-ppl AT cs.uiuc.edu
- Subject: Re: [charm] [cosmology-ppl] Tipsy file in ASCII
- Date: Wed, 8 Feb 2012 09:34:38 -0800 (PST)
- List-archive: <http://lists.cs.uiuc.edu/pipermail/charm>
- List-id: CHARM parallel programming system <charm.cs.uiuc.edu>
You likely have an "endian" problem. The cube300.tbin has a different byte order than your architecture. The TipsyReader class figures this out, but bin2ascii does not. Try using "totipnat" in the tipsy_tools distribution to convert to your native binary format. E.g.
totipnat < cube300.tbin | bin2ascii > cube300.out
Tom Quinn Astronomy, University of Washington
Internet:
trq AT astro.washington.edu
Phone: 206-685-9009
On Wed, 8 Feb 2012, Shad Kirmani wrote:
Hello Dr. Quinn,
I used the following code to read cube300.tbin file:
Tipsy::TipsyReader r(filename);
Tipsy::header tipsyHeader = r.getHeader();
int nTotalParticles = tipsyHeader.nbodies;
int nTotalSPH = tipsyHeader.nsph;
int nTotalDark = tipsyHeader.ndark;
int nTotalStar = tipsyHeader.nstar;
The total number of particles when read through the above code is 110592.
When I convert the same file into ASCII, using the bin2ascii utility, the
first
line mentions the total number of particles as 11534592.
I converted cube300.tbin into ASCII using the following command:
./bin2ascii < cube300.tbin > cube300.out
Thanks,
Shad
On Wed, Feb 8, 2012 at 10:35 AM, Tom Quinn
<trq AT astro.washington.edu>
wrote:
Documentation for the ASCII format used by ascii2bin is at
http://www-hpcc.astro.washington.edu/tipsy/man/readascii.html
Tom Quinn Astronomy, University of Washington
Internet:
trq AT astro.washington.edu
Phone: 206-685-9009
On Wed, 8 Feb 2012, Shad Kirmani wrote:
Hello,
I have been struggling to understand the Tipsy file format. Can
anybody
please provide a Tipsy file in ASCII format.
I can then use ascii2bin and bin2ascii utilities, mentioned at
http://librarian.phys.washington.edu/astro/index.php/Research:Tipsy,
to
generate the binary files and vice versa.
Thanks,
Shad
- [charm] Tipsy file in ASCII, Shad Kirmani, 02/08/2012
- Re: [charm] [cosmology-ppl] Tipsy file in ASCII, Tom Quinn, 02/08/2012
- Re: [charm] [cosmology-ppl] Tipsy file in ASCII, Shad Kirmani, 02/08/2012
- Re: [charm] [cosmology-ppl] Tipsy file in ASCII, Tom Quinn, 02/08/2012
- Re: [charm] [cosmology-ppl] Tipsy file in ASCII, Shad Kirmani, 02/08/2012
- Re: [charm] [cosmology-ppl] Tipsy file in ASCII, Tom Quinn, 02/08/2012
Archive powered by MHonArc 2.6.16.