
Hi all,
I am trying to explore the rockstar halo finder within yt following the text Chris Moody added to the docs:
https://bitbucket.org/yt_analysis/yt-doc/src/eb3c3f1f7552/source/analysis_mo...
The instructions include downloading a patched version of rockstar from this link:
https://bitbucket.org/MatthewTurk/rockstar
which gives me a "permission denied" message. I've poked around in yt, and I don't think that the rockstar code is replicated in there. Are the instructions wrong, or are the permissions incorrect on Matt's BB repo?
I also noticed that in the rockstar documentation, it says "The yt installation allows the option to install and configure Rockstar appropriately" - but I can't find anything about rockstar in install_script.sh. Am I missing something?
Thanks for the help!

Hi Stephen,
You should be able to use the unmodified version of rockstar. Matt's modifications allow you to add a halo 'field' per se that can compute a halo quantities that Rockstar doesn't normally compute. I haven't used this version, and the unmodified Rockstar works fine for me thus far.
However, I don't think we ever added a Rockstar installation option to the install script, despite the docs text. Does Rockstar without modification work for you?
chris
On Wed, Aug 15, 2012 at 12:44 PM, Stephen Skory s@skory.us wrote:
Hi all,
I am trying to explore the rockstar halo finder within yt following the text Chris Moody added to the docs:
https://bitbucket.org/yt_analysis/yt-doc/src/eb3c3f1f7552/source/analysis_mo...
The instructions include downloading a patched version of rockstar from this link:
https://bitbucket.org/MatthewTurk/rockstar
which gives me a "permission denied" message. I've poked around in yt, and I don't think that the rockstar code is replicated in there. Are the instructions wrong, or are the permissions incorrect on Matt's BB repo?
I also noticed that in the rockstar documentation, it says "The yt installation allows the option to install and configure Rockstar appropriately" - but I can't find anything about rockstar in install_script.sh. Am I missing something?
Thanks for the help!
-- Stephen Skory s@skory.us http://stephenskory.com/ 510.621.3687 (google voice) _______________________________________________ yt-dev mailing list yt-dev@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org

Hi Chris,
However, I don't think we ever added a Rockstar installation option to the install script, despite the docs text. Does Rockstar without modification work for you?
I'm trying the unmodified version, but it's not working. Perhaps I've done something wrong:
1. I downloaded this http://code.google.com/p/rockstar/downloads/detail?name=rockstar-0.99.tar.gz..., untarred it. 2. Inside that directory I did "make lib". There is a "librockstar.so" file there now. 3. I "export ROCKSTAR_DIR=..." to this rockstar directory, and "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ROCKSTAR_DIR". 4. I went into the top level dir of yt and did "python setup.py build_ext -i", then "python setup.py install". 5. I am using the sample script provided in the doc with only small modifications specific to my dataset.
After doing this, I am getting this error: "Library not loaded: librockstar.so" when I try running the script. Can you see what I've done wrong?
Thanks!

Sorry, Stephen, this looks like it might be a tricky business with your environment; what you described works for me, or has in the past. I'd recommend you use the tools at your disposal -- "otool -L", ldd, etc etc, as well as (if you're on OSX) using DYLD_DEBUG or (linux) LD_DEBUG to figure out why it's not finding the library. Check it against the Cython-generated rockstar wrapper .so files.
Rockstar support is still somewhat in beta, and so shaking it out like this is probably going to be necessary. If we can record your struggles with getting it running, and then figure out the best way to use it, that will be very valuable moving forward.
-Matt
On Wed, Aug 15, 2012 at 4:27 PM, Stephen Skory s@skory.us wrote:
Hi Chris,
However, I don't think we ever added a Rockstar installation option to the install script, despite the docs text. Does Rockstar without modification work for you?
I'm trying the unmodified version, but it's not working. Perhaps I've done something wrong:
- I downloaded this
http://code.google.com/p/rockstar/downloads/detail?name=rockstar-0.99.tar.gz..., untarred it. 2. Inside that directory I did "make lib". There is a "librockstar.so" file there now. 3. I "export ROCKSTAR_DIR=..." to this rockstar directory, and "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ROCKSTAR_DIR". 4. I went into the top level dir of yt and did "python setup.py build_ext -i", then "python setup.py install". 5. I am using the sample script provided in the doc with only small modifications specific to my dataset.
After doing this, I am getting this error: "Library not loaded: librockstar.so" when I try running the script. Can you see what I've done wrong?
Thanks!
-- Stephen Skory s@skory.us http://stephenskory.com/ 510.621.3687 (google voice) _______________________________________________ yt-dev mailing list yt-dev@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org

Hi Chris & Matt,
here's what I've figured out. I've made some progress...
On Linux, the instructions work as advertised, but when I run rockstar on my dataset I get this, below. Is this telling me that rockstar has a minimum cosmological volume over which it will work? I think the 0.5 refers to the 0.5 Mpc/h box I'm using. The overlap length appears to be hard coded in config.template.h - can I just change it?
-- cut -- using data0012_rockstar as outbase using data0012_rockstar as outbase [ 0s] Accepting connections... [ 0s] Accepted all reader / writer connections. [ 0s] Verified all reader / writer connections. [ 0s] Reading 1 blocks for snapshot 0... reading from particle filename ./inline.0 Block #0 | Particles 1000000 | Grids 599 [Error] Box size too small (0.500000) relative to overlap length (3.000000)! -------------------------------------------------------------------------- mpirun has exited due to process rank 0 with PID 4747 on -- cut --
On Mac OS X, otool -L tells me that the absolute path to librockstar.so isn't being saved in rockstar_interface.so. Using the method described in this post http://stackoverflow.com/questions/1937232/linking-to-a-dynamic-library-on-a... on rockstar_interface.so I can get past the missing library error, but then I get this crash http://paste.yt-project.org/show/2650/, which isn't super useful. Perhaps manually changing the shared object reference isn't the best idea.
I'll keep digging, but any bright ideas would be appreciated! Thanks!

Hi Stephen,
The rockstar wrapper overrides either most or all of the configuration. I would suggest checking how it is setting the domain size.
Thanks for he info about the rockstar library. When we add it to the install script we can address this. Peter said adding it to the stack is fine with him.
Matt (getting on a very delayed plane now, but didn't want to leave you hanging since replies may be slow for a few days) On Aug 15, 2012 7:17 PM, "Stephen Skory" s@skory.us wrote:
Hi Chris & Matt,
here's what I've figured out. I've made some progress...
On Linux, the instructions work as advertised, but when I run rockstar on my dataset I get this, below. Is this telling me that rockstar has a minimum cosmological volume over which it will work? I think the 0.5 refers to the 0.5 Mpc/h box I'm using. The overlap length appears to be hard coded in config.template.h - can I just change it?
-- cut -- using data0012_rockstar as outbase using data0012_rockstar as outbase [ 0s] Accepting connections... [ 0s] Accepted all reader / writer connections. [ 0s] Verified all reader / writer connections. [ 0s] Reading 1 blocks for snapshot 0... reading from particle filename ./inline.0 Block #0 | Particles 1000000 | Grids 599 [Error] Box size too small (0.500000) relative to overlap length (3.000000)!
mpirun has exited due to process rank 0 with PID 4747 on -- cut --
On Mac OS X, otool -L tells me that the absolute path to librockstar.so isn't being saved in rockstar_interface.so. Using the method described in this post
http://stackoverflow.com/questions/1937232/linking-to-a-dynamic-library-on-a... on rockstar_interface.so I can get past the missing library error, but then I get this crash http://paste.yt-project.org/show/2650/, which isn't super useful. Perhaps manually changing the shared object reference isn't the best idea.
I'll keep digging, but any bright ideas would be appreciated! Thanks!
-- Stephen Skory s@skory.us http://stephenskory.com/ 510.621.3687 (google voice) _______________________________________________ yt-dev mailing list yt-dev@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org

Hi Stephen, I've had a patch where the OVERLAP_LENGTH is changed to zero, but I'll PR it shortly. It was used when Rockstar was operating on Bolshoi, which is broken up into 125 spatial volumes for every snapshot. Rockstar then tries to load in the neighboring cells, but everything yt feeds it should be single-domain.
Anyway, let me PR this and see if that fixes things.
chris
On Wed, Aug 15, 2012 at 4:22 PM, Matthew Turk matthewturk@gmail.com wrote:
Hi Stephen,
The rockstar wrapper overrides either most or all of the configuration. I would suggest checking how it is setting the domain size.
Thanks for he info about the rockstar library. When we add it to the install script we can address this. Peter said adding it to the stack is fine with him.
Matt (getting on a very delayed plane now, but didn't want to leave you hanging since replies may be slow for a few days) On Aug 15, 2012 7:17 PM, "Stephen Skory" s@skory.us wrote:
Hi Chris & Matt,
here's what I've figured out. I've made some progress...
On Linux, the instructions work as advertised, but when I run rockstar on my dataset I get this, below. Is this telling me that rockstar has a minimum cosmological volume over which it will work? I think the 0.5 refers to the 0.5 Mpc/h box I'm using. The overlap length appears to be hard coded in config.template.h - can I just change it?
-- cut -- using data0012_rockstar as outbase using data0012_rockstar as outbase [ 0s] Accepting connections... [ 0s] Accepted all reader / writer connections. [ 0s] Verified all reader / writer connections. [ 0s] Reading 1 blocks for snapshot 0... reading from particle filename ./inline.0 Block #0 | Particles 1000000 | Grids 599 [Error] Box size too small (0.500000) relative to overlap length (3.000000)!
mpirun has exited due to process rank 0 with PID 4747 on -- cut --
On Mac OS X, otool -L tells me that the absolute path to librockstar.so isn't being saved in rockstar_interface.so. Using the method described in this post
http://stackoverflow.com/questions/1937232/linking-to-a-dynamic-library-on-a... on rockstar_interface.so I can get past the missing library error, but then I get this crash http://paste.yt-project.org/show/2650/, which isn't super useful. Perhaps manually changing the shared object reference isn't the best idea.
I'll keep digging, but any bright ideas would be appreciated! Thanks!
-- Stephen Skory s@skory.us http://stephenskory.com/ 510.621.3687 (google voice) _______________________________________________ yt-dev mailing list yt-dev@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
yt-dev mailing list yt-dev@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org

Hi Chris,
I've had a patch where the OVERLAP_LENGTH is changed to zero, but I'll PR it shortly. It was used when Rockstar was operating on Bolshoi, which is broken up into 125 spatial volumes for every snapshot. Rockstar then tries to load in the neighboring cells, but everything yt feeds it should be single-domain.
Anyway, let me PR this and see if that fixes things.
I'll give your changeset a shot soon.
I wanted to provide an update on my Mac OS X investigations. I've discovered that the crash I reported with my most recent message happens when I use 2 cores. Specifically, using 2 cores causes a crash at "self.pool.add_workgroup(self.num_writers, name = "writers")" in the run() command because self.num_writers is 0. I'm not familiar enough with rockstar to know if 2 cores is too few or not, or with the pool mechanism to know what's going on. Any comments?
If anyone has any bright ideas on how to ensure librockstar.so is referenced correctly from rockstar_interface.so on a Mac, let me know!

Hi all,
If anyone has any bright ideas on how to ensure librockstar.so is referenced correctly from rockstar_interface.so on a Mac, let me know!
OK, correctly setting DYLD_LIBRARY_PATH seems to work without modifying rockstar_interface.so. Things are coming together.

Hi Stephen, Usually I ask for at least 3 MPI processes; one for the server, one for a writer, one for a reader. Only the writer does any actual CPU-intensive work, so maybe try 2+NCPUS? I've only tried this on a big nodes at NASA Ames, and I'm curious how well the scaling works with fewer numbers.
chris
On Thu, Aug 16, 2012 at 2:05 PM, Stephen Skory s@skory.us wrote:
Hi all,
If anyone has any bright ideas on how to ensure librockstar.so is referenced correctly from rockstar_interface.so on a Mac, let me know!
OK, correctly setting DYLD_LIBRARY_PATH seems to work without modifying rockstar_interface.so. Things are coming together.
-- Stephen Skory s@skory.us http://stephenskory.com/ 510.621.3687 (google voice) _______________________________________________ yt-dev mailing list yt-dev@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org

Hi Chris,
I've just tried out your PR changeset, and a couple things have come up.
Firstly, when I load() my Enzo dataset, it can't decide if it's Enzo or ART and gives up. I didn't change my script at all, which previously would die on the OVERLAP issue.
P000 yt : [ERROR ] 2012-08-16 15:21:43,751 Multiple output type candidates for data0012: P000 yt : [ERROR ] 2012-08-16 15:21:43,751 Possible: EnzoStaticOutput P000 yt : [ERROR ] 2012-08-16 15:21:43,751 Possible: ARTStaticOutput
Secondly, when I specify EnzoStaticOutput(), I can get past the error, and I am now getting this:
http://paste.yt-project.org/show/2652/
Any ideas what's going on? Thanks!

Hi Chris,
Secondly, when I specify EnzoStaticOutput(), I can get past the error, and I am now getting this:
http://paste.yt-project.org/show/2652/
Any ideas what's going on? Thanks!
On this second point, I think you may have forgot to commit/update your rockstar.py file. The function call to it in rockstar.py doesn't match the one in the pyx file (it's missing num_snaps, total_paritcles and dm_type):
rockstar.py:
self.handler.setup_rockstar(self.server_address, self.port, parallel = self.comm.size > 1, num_readers = self.num_readers, num_writers = self.num_writers, writing_port = -1, block_ratio = block_ratio, outbase = self.outbase, particle_mass = float(self.particle_mass), **kwargs)
rockstar_interface.pyx:
def setup_rockstar(self, char *server_address, char *server_port, int num_snaps, np.int64_t total_particles, int dm_type, np.float64_t particle_mass = -1.0, int parallel = False, int num_readers = 1, int num_writers = 1, int writing_port = -1, int block_ratio = 1, int periodic = 1, int min_halo_size = 25, outbase = "None"):

Hi Stephen, You're correct on both counts; I had a bug in the ART code which said all datasets were ART datasets. And I indeed did forgot to commit rockstar.py. I've updated the changest accordingly, does that work for you?
chris
On Thu, Aug 16, 2012 at 2:40 PM, Stephen Skory <s@skory.us<javascript:_e({}, 'cvml', 's@skory.us');>
wrote:
Hi Chris,
Secondly, when I specify EnzoStaticOutput(), I can get past the error, and I am now getting this:
http://paste.yt-project.org/show/2652/
Any ideas what's going on? Thanks!
On this second point, I think you may have forgot to commit/update your rockstar.py file. The function call to it in rockstar.py doesn't match the one in the pyx file (it's missing num_snaps, total_paritcles and dm_type):
rockstar.py:
self.handler.setup_rockstar(self.server_address, self.port, parallel = self.comm.size > 1, num_readers = self.num_readers, num_writers = self.num_writers, writing_port = -1, block_ratio = block_ratio, outbase = self.outbase, particle_mass = float(self.particle_mass), **kwargs)
rockstar_interface.pyx:
def setup_rockstar(self, char *server_address, char *server_port, int num_snaps, np.int64_t total_particles, int dm_type, np.float64_t particle_mass = -1.0, int parallel = False, int num_readers = 1, int num_writers = 1, int writing_port = -1, int block_ratio = 1, int periodic = 1, int min_halo_size = 25, outbase = "None"):
-- Stephen Skory s@skory.us <javascript:_e({}, 'cvml', 's@skory.us');> http://stephenskory.com/ 510.621.3687 (google voice) _______________________________________________ yt-dev mailing list yt-dev@lists.spacepope.org <javascript:_e({}, 'cvml', 'yt-dev@lists.spacepope.org');> http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org

Hi Chris,
You're correct on both counts; I had a bug in the ART code which said all datasets were ART datasets. And I indeed did forgot to commit rockstar.py. I've updated the changest accordingly, does that work for you?
Sorry, no. Your PR has some conflicts in it right now that I'm not sure I can resolve. Can you take a look at them, please?
Thanks!
participants (3)
-
Christopher Moody
-
Matthew Turk
-
Stephen Skory