Modify

Opened 7 years ago

Last modified 7 years ago

#917 new enhancement

Provide a way to query mdb entries for the current machine

Reported by: Ian Hinder Owned by: Erik Schnetter
Priority: minor Milestone:
Component: SimFactory Version:
Keywords: Cc:

Description

I would like to find out the value of the "basedir" entry in the MDB for the current machine. I currently have to do:

simdir=$(sim print-mdb-entry datura|grep '^[ \t]*basedir[ \t]*=[ \t]\(.*\)[\t ]*$'|awk '{print $3}')

This is quite ugly, and also requires me to know that the current machine is "datura". I would like to be able to do

sim print-mdb-entry basedir

and have it print the value of basedir for the current machine. If I instead specify a different machine,

sim --machine ranger print-mdb-entry basedir

then it could print the value for the other machine. This would be much more intuitive and useful than the current behaviour.

Attachments (0)

Change History (1)

comment:1 Changed 7 years ago by Ian Hinder

I just discovered "sim get-output-dir <sim>". This was what I was trying to ultimately compute.

[ianhin@login-damiana EinsteinToolkitTests]$ sim get-output-dir EinsteinToolkitTests_f1e7cc6bccfee780c84e05fbb6f2889ea598d7c8_1
Simulation name: EinsteinToolkitTests_f1e7cc6bccfee780c84e05fbb6f2889ea598d7c8_1
Output directory: /lustre/datura/ianhin/simulations/EinsteinToolkitTests_f1e7cc6bccfee780c84e05fbb6f2889ea598d7c8_1/output-0000/

This is not very useful for use from a script. I would prefer that it just gave me the output directory rather than all that extra information which then needs to be parsed away.

Still, I think the above would be a useful modification to print-mdb-entry.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain Erik Schnetter.
Next status will be 'review'.
as The resolution will be set.
to The owner will be changed from Erik Schnetter to the specified user.
Next status will be 'confirmed'.
The owner will be changed from Erik Schnetter to anonymous.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.