Write Potential Bug?

34 views
Skip to first unread message

Greg Meece

unread,
Mar 1, 2012, 5:07:39 PM3/1/12
to enzo...@googlegroups.com
Hi everyone,

I'm working on a problem where I need to look at the gravitational potential. When I try to output the potential using WritePotential=1, however, enzo crashes during initialization. If I don't set WritePotential in my parameter file, the code runs fine, but if I add the line 'WritePotential=1' the simulation crashes with the following error:

HDF5-DIAG: Error detected in HDF5 (1.8.4-patch1) thread 140711741348704:
  #000: ../../../src/H5Ddeprec.c line 156 in H5Dcreate1(): no name
    major: Invalid arguments to routine
    minor: Bad value
Caught fatal exception:

   'Error creating dataset (null)'
at New_Grid_WriteGrid.C:739

Backtrace:

BT symbol: ./enzo.exe() [0x406d75]
BT symbol: ./enzo.exe() [0x553800]
BT symbol: ./enzo.exe() [0x554642]
BT symbol: ./enzo.exe() [0x5b7c9c]
BT symbol: ./enzo.exe() [0x5b6915]
BT symbol: ./enzo.exe() [0x4209ad]
BT symbol: ./enzo.exe() [0x466762]
BT symbol: ./enzo.exe() [0x406497]
BT symbol: /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xed) [0x7ff9ff7ef30d]
BT symbol: ./enzo.exe() [0x406b65]
Failure reported on processor 0
application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0

I'm setting up the potential using an NFW profile generated using the PointSourceGravity parameters.

Not sure if this is a bug or just an error on my part.

I was able to get the potential using the -g option on restart, but I think WritePotential should work to output the potential at every step.

--Greg Meece

Elizabeth Tasker

unread,
Mar 3, 2012, 10:47:22 AM3/3/12
to enzo...@googlegroups.com
Hi Greg,

From what I can see from the code, WritePotential will only work from a restart for a single output (i.e. the -g option; read in, compute, dump). This is because the field is only added to the baryon fields in OutputPotentialFieldOnly.C. 

It's possible doing a restart from the output of "enzo -g" would work, since then the gravitational field would already be in the baryon field list. Have you tried this?

Elizabeth


--
You received this message because you are subscribed to the Google Groups "enzo-dev" group.
To view this discussion on the web visit https://groups.google.com/d/msg/enzo-dev/-/LyVPRHSvTGsJ.
To post to this group, send email to enzo...@googlegroups.com.
To unsubscribe from this group, send email to enzo-dev+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/enzo-dev?hl=en.

Britton Smith

unread,
Mar 8, 2012, 6:38:07 PM3/8/12
to enzo...@googlegroups.com
Hi Greg,

I think I know what the problem is.  Setting WritePotential = 1 works just fine in a number of problem types, like the cosmology simulation.  If you do a grep of WritePotential in the source, you will see that, for example, in CosmologySimulationInitialize.C and Grid_CosmologySimulationInitializeGrid.C, the data label and field type are created for the potential field, allowing it to be written out.  I think all you need to do is copy those few lines of code that appear in those routines to your problem and grid initializer.

Feel free to come find me next week if you have any questions about this.

Britton
Reply all
Reply to author
Forward
0 new messages