These are chat archives for astropy/astropy

28th
Nov 2016
Anže Slosar
@slosar
Nov 28 2016 10:51
Hi all: A quick question if anybody knows how to help. I need an approximate moon position on sky, within a degree is fine, I'm using get_moon and then trasnform_to(AltAz(...)). The issue is that it runs fine when running a single process, but when running in MPI mode, it seems that on our cluster, when hundreds of processes try to get the cached ephemerides, they fail so they all start to download a new file, then they can't acquire lock and things to sideways. I tried disabling it using iers.conf.auto_download = False , but this makes it even slower, since it now seems to want to open a certain Table every time I call get_moon so it becomes really really slow (as in seconds for a moon position). Any ideas on how to fix this? Ideally I would just like to tell it, ignore all the subtleties and give me something very approximate.
matrixbot
@matrixbot
Nov 28 2016 11:03
Cadair Can't you make it used a cache directory which is not common to all processes?
Cadair *use a
Cadair (I have no idea what an actual fix in astropy would look like)
Anže Slosar
@slosar
Nov 28 2016 11:04
That sounds like a good proposition and I can make that directory local scratch to make it even faster.
Let me have a look...
Anže Slosar
@slosar
Nov 28 2016 11:12
It turns out you cannot change that particular cache dir, but you can move everything through env variable, see e.g. http://docs.astropy.org/en/stable/config/