Comments (9)
Thanks for reporting! This does sound strange and I can’t immediately understand what the problem would be.
Could you report the full result of tangos list-possible-properties
? And how exactly are you asking for the property class from the name, could you give the exact code?
from tangos.
Hi Andrew! Here it is:
tangos list-possible-properties
tangos_properties_uchadaya
name | handler | property class
-------------------------------+-----------------+-------------------------------------------------------------
BH_central_distance | PynbodyInputHan | tangos.properties.pynbody.BH.BH
...
v_disp_profile | PynbodyInputHan | tangos_properties_uchadaya.vdisp.VDispProfile
z | live | tangos.properties.intrinsic.IntrinsicProperties
v_disp_profile is the property I defined.
I check for the property class in iPython as follows:
import tangos
tangos.properties.providing_class('v_disp_profile')
Here is the batch script I use to add the property to the database:
#PBS -S /bin/bash
#PBS -N db-RC
#PBS -l select=2:ncpus=24:mpiprocs=1:model=bro:bigmem=False
#PBS -l walltime=2:00:00
#PBS -q devel
cd $PBS_O_WORKDIR
module load mpi-sgi/mpt
export TANGOS_PROPERTY_MODULES=tangos_nbodyshop_properties, tangos_properties_uchadaya
export TANGOS_SIMULATION_FOLDER=/nobackupp2/mtremmel/Romulus/
export TANGOS_DB_CONNECTION=/nobackupp2/uchadaya/data_romulusC.db
export SIMS="h1.cosmo50"
mpiexec tangos write v_disp_profile --for $SIMS --type halo --load-mode=server --backend mpi4py --backwards --hmax 1
from tangos.
OK, so tangos is definitely picking up your module and registering the class, which is good.
The reason tangos.properties.providing_class('v_disp_profile')
is because, as the list states, your class is only compatible with pynbody. You have to tell it you'll be providing pynbody data so tangos.properties.providing_class('v_disp_profile', tangos.input_handlers.pynbody.PynbodyInputHandler)
. The docstring states that, without specifying this, you'll only see live properties.
If your batch script is failing, though, I'm less sure what's going wrong - maybe send a pointer to the output?
from tangos.
Ah, I see - specifying the handler did help iPython access the providing class.
The batch job error file is attached.
db-RC.e3960409.txt
from tangos.
Really weird. Could you try inserting tangos list-possible-properties
into the batch script and checking what comes out just to be sure it is picking up in that environment too.
Also, what is tangos.get_simulation("<simulation name>").get_output_handler()
?
from tangos.
Aha! list-possible-properties in the batch script does not list properties from my module.
Given the submission script above, why would this be the case if iPython knows where to look?
PS The output handler is fine in ipython:
<tangos.input_handlers.pynbody.ChangaInputHandler at 0x7fffc1735c10>
from tangos.
Hard to know - could it be that somehow your PYTHONPATH is incorrect within PBS, so the module import fails?
That should trigger a warning but maybe somehow it is not showing up.
Maybe try printing something in your module __init.py__
to test if it's being imported in the batch runs?
from tangos.
Wow, it turns out the issue is that I specified:
export TANGOS_PROPERTY_MODULES=tangos_nbodyshop_properties, tangos_properties_uchadaya
and that space bar between the module names was the problem! when i removed it, tangos_list_properties shows my property as well.
from tangos.
Yes, this is not an issue with tangos but rather with parsing in the shell. An alternative way around it is to export TANGOS_PROPERTY_MODULES="tangos_nbodyshop_properties, tangos_properties_uchadaya"
- the quotes will stop the space from interfering.
Closing the issue now.
from tangos.
Related Issues (20)
- Can't access raw simulation data via Tangos tutorial page: ftp://ftp.star.ucl.ac.uk/app/tangos/tutorial_gadget.tar.gz HOT 3
- Tangos serve AND nosetests issues HOT 2
- Importing non-numeric properties from halo finder HOT 3
- tangos serve isn't working with certain databases HOT 4
- Tangos Importing of properties does not check if properties already exist? HOT 2
- SQLAlchemy warning HOT 1
- Draw the merger tree using the canvas rather than an SVG
- progenitor tracking is failing for BHs HOT 1
- Systematic database lock when importing first properties with MPI HOT 2
- Importing properties from old pynbody handlers might be incomplete
- Is it possible to calculate quantities for trackers that depend on their host halo properties? HOT 1
- Bug when linking timesteps in sqlite HOT 2
- Mixed type data returns from property calculations
- Tangos seems broken with SQLAlchemy > 2.0 HOT 1
- Installation instructions mention nose instead of pytests HOT 1
- consistent_trees_ids missing for phantoms HOT 2
- `pip install`ed version do not seem to include the .svg files HOT 3
- file_ignore_pattern ignored if extension is None in finding.py HOT 2
- Resume calculation interactions with --force HOT 2
- Gyr units is assumed when reading in BHmergers file (changa_bh_importer)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tangos.