I've recently fiddled with tpm2gadget to get it working, here's what I
changed:
snapshot.h:
Change the line
char fill[256 - 6*4 - 6*8 - 2*8 - 2*4 - 6*4 - 2*4 - 4*8 - 9*4 -
16]; /* fills to 256 Bytes */
to
char fill[256 - 6*4 - 6*8 - 2*8 - 2*4 - 6*4 - 2*4 - 4*8 - 9*4 -
8]; /* fills to 256 Bytes */
ie the last size is wrong. That will get Gadget loading the file.
Depending on the simulation you're running you may also need to change
the units used for the mass calculation, else gadget will throw an error
checking the total mass against Omega0.
To do this, in snapshot.h change
double getCriticalRho() {
return 3./(8.*pi*G) * (HubbleParam*HubbleParam*HubbleUnit*HubbleUnit *
LenUnit*LenUnit*LenUnit / MassUnit); } // internal units
to something like
double getCriticalRho() {
return (3.*0.1*0.1)/(8.*pi*G) ; } // internal units
where you'll want to change 0.1 to the internal Hubble parameter used by
gadget. Also make sure the values in common.cpp are correct for your
simulation.
Cheers,
Scott Wales
On Thu, 2008-03-20 at 23:37 +0100, Carsten Frigaard wrote:
>
> ..and, oh, there is a slight defect in the version 0.9 tpm2gadget code, something about the size of the header. I do not remember the actual one-line-fix right now, but it was something about the headerblocksize...You might want to checkout a line like:
>
> uint blkSize = sizeof(SnapshotHeader);
>
> where blkSize are expected to be 256.
> Regards
> Carsten Frigaard
>
> ----------------------------------------
> > From: carsten_frigaard_at_hotmail.com
> > Date: Thu, 20 Mar 2008 08:22:58 +0100
> > To: gadget-list_at_MPA-Garching.MPG.DE
> > Subject: Re: [gadget-list] endrun called with errorlevel 890
> >
> >
> >
> > Is the snapshot file in the right format - I think the tpm2gadget outputs in snapshot format 1, that is with a preamble of 256 in the file (in byte or word format, I do not remember), and you can check this by a hexdump of the snapshotfile, or use my "ghead" utility found in the Gadget addon package found at frigaard.homelinux.org.
> >
> > The Gadget2 parameter file also has to be set to the right snapshotformat, like
> >
> > % Code options
> > ICFormat 1
> > SnapFormat 1
> >
> > Regards
> > Carsten
> >
> >
> > ________________________________
> >> Date: Thu, 20 Mar 2008 11:09:15 +0500
> >> From: ammar.ahmad.awan_at_gmail.com
> >> To: gadget-list_at_MPA-Garching.MPG.DE
> >> Subject: [gadget-list] endrun called with errorlevel 890
> >>
> >> Hi all,
> >>
> >> I am trying to run the simulations with an initial condtions file created using the tpm2gadget (http://www.science.uwaterloo.ca/~bjkrane/) but it is not being recognized with any of the ICFormat in the param file.
> >>
> >> The simulations exit as follows:
> >>
> >>
> >> Hubble (internal units) = 0.1
> >> G (internal units) = 43007.1
> >> UnitMass_in_g = 1.989e+43
> >> UnitTime_in_s = 3.08568e+16
> >> UnitVelocity_in_cm_per_s = 100000
> >> UnitDensity_in_cgs = 6.76991e-22
> >> UnitEnergy_in_cgs = 1.989e+53
> >>
> >> incorrect header format
> >> task 0: endrun called with an error level of 890
> >>
> >>
> >> [chenab1:25789] MPI_ABORT invoked on rank 0 in communicator MPI_COMM_WORLD with errorcode 890
> >> mpirun noticed that job rank 1 with PID 25790 on node chenab1 exited on signal 15 (Terminated).
> >> 2 additional processes aborted (not shown)
> >>
> >> If someone has tried something like this or does any has any idea?
> >>
> >>
> >> -
> >> Regards
> >> Ammar Ahmad
> >
> > _________________________________________________________________
> > Tjek filmtrailere med vennerne og start biografturen på Messenger
> > http://www2.messengerplayground.dk/aktiviteter/47/?cmp=txt_msn_film_jan
> >
> >
> >
> >
> > -----------------------------------------------------------
> >
> > If you wish to unsubscribe from this mailing, send mail to
> > minimalist_at_MPA-Garching.MPG.de with a subject of: unsubscribe gadget-list
> > A web-archive of this mailing list is available here:
> > http://www.mpa-garching.mpg.de/gadget/gadget-list
> O
> _________________________________________________________________
> Spil Sten Saks Papir mod dine venner i Messenger
> http://www2.messengerplayground.dk/spil/102?cmp=text_stensakspapir
>
>
>
>
> -----------------------------------------------------------
>
> If you wish to unsubscribe from this mailing, send mail to
> minimalist_at_MPA-Garching.MPG.de with a subject of: unsubscribe gadget-list
> A web-archive of this mailing list is available here:
> http://www.mpa-garching.mpg.de/gadget/gadget-list
Received on 2008-03-23 05:04:36