Re: How to pass from the equations to the code and to the highly optimized code

From: brunetto <brunetto.ziosi_at_gmail.com>
Date: Wed, 5 Sep 2012 16:47:08 +0200

Printing N-GenIC positions I obtain -nan in the logs with

fprintf(saved_positions, "%d %f %f %f\n", i, P[i].Pos[0], P[i].Pos[1],
P[i].Pos[2]);

Is there a possible motivation or maybe something is broken in the code or
in my parameters?
I also tried to use the resulting ICs ni Gadget but I obtained

reading file `./ics' on task=0 (contains 2097152 particles.)
distributing this file to tasks 0-1
Type 0 (gas): 0 (tot= 0000000000) masstab=0
Type 1 (halo): 2097152 (tot= 0002097152) masstab=3.59982
Type 2 (disk): 0 (tot= 0000000000) masstab=0
Type 3 (bulge): 0 (tot= 0000000000) masstab=0
Type 4 (stars): 0 (tot= 0000000000) masstab=0
Type 5 (bndry): 0 (tot= 0000000000) masstab=0

incorrect block-sizes detected!
Task=0 blocknr=2 blksize1=16777216 blksize2=1048577
task 0: endrun called with an error level of 1889

I've also another question. I'm trying to understand the code with "debug
printing" but
I can't understand, for example, why to fill a seed matrix starting from
the corners and
with random values multiplied buy the maximum integer number in
hexadecimal :

for(j = 0; j < i; j++)
seedtable[i * Nmesh + j] = 0x7fffffff * gsl_rng_uniform(random_generator);
[...]

Thanks!



On 3 September 2012 14:29, Enders <florian.enders_at_gmx.net> wrote:

>
> You could try to add debug statements to the files that print informations
> to another file. In the "read_ic.c" and "init.c" files for example you
> could
> print out the value of the positions and velocities and then search the
> other files for what happens to those to variables. How are they processed
> by the rest of the code etc..
>
>
> Hi all!
>> I would like to thank all of you that provide me articles and lectures
>> references
>> on N-body simulation.
>> I've read them all, but I'm still stuck in understanding the (Gadget)
>> source code enough to be able to modify it!
>> Is there some literature on how to pass from the equations to the code and
>> to the highly optimized code?
>> I'm going to the IMPRS Summer school on computational astrophysics but I
>> would like to be
>> almost a bit more prepared so that I can ask for advices.
>>
>> Thank you very much
>>
>>
>
> --
> Erstellt mit Operas revolutionärem E-Mail-Modul:
> http://www.opera.com/mail/
>
>
>
>
> ------------------------------**-----------------------------
> 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<http://www.mpa-garching.mpg.de/gadget/gadget-list>
>



-- 
Brunetto Ziosi
PhD Student in Astronomy
homepage: http://www.brunettoziosi.eu
Department of Physics and Astronomy
University of Padova
Vicolo dell'Osservatorio 3
35122 Padova
Received on 2012-09-05 16:47:29

This archive was generated by hypermail 2.3.0 : 2022-09-01 14:03:42 CEST