codes-org / codes

The Co-Design of Exascale Storage Architectures (CODES) simulation framework builds upon the ROSS parallel discrete event simulation engine to provide high-performance simulation utilities and models for building scalable distributed systems simulations
Other
40 stars 16 forks source link

Support absolute paths in conf file names (Imported #147) #147

Closed nmcglo closed 4 years ago

nmcglo commented 8 years ago

Original Issue Author: Justin Wozniak Original Issue ID: 147 Original Issue URL: https://xgitlab.cels.anl.gov/codes/codes/issues/147


CODES application conf files could refer to conf files in CODES. It would be best to be able to specify these as absolute paths. For example, in my APS config file, I have:

PARAMS
{
  ...
  net_config_file="/home/wozniak/proj/CODES/code/tests/conf/ng-mpi-tukey.dat";
}

Could configuration_get_value_relpath() skip prepending config_dir if the value has a leading slash?

nmcglo commented 8 years ago

Jonathan Jenkins:

Ah, that makes sense :). I see what you mean now - modelnet (particularly loggp) internally uses _relpath without an escape hatch if you e.g. want absolute paths. I'll think about how best to address this.

nmcglo commented 8 years ago

Justin Wozniak:

Oops- I mean model_net_configure(). The key of interest is net_config_file.

nmcglo commented 8 years ago

Justin Wozniak:

This is inside of CODES configuration_load().

nmcglo commented 8 years ago

Jonathan Jenkins:

Is configuration_get_value sufficient in your case? configuration_get_value_relpath is simply a shim over it - configuration_get_value just grabs the entry as a string.

nmcglo commented 8 years ago

Justin Wozniak:

Also, if CODES knows where it is installed, you could support:

net_config_file="CODES:tests/conf/ng-mpi-tukey.dat";
nmcglo commented 8 years ago

Jonathan Jenkins:

I'm afraid I don't follow. configuration_load just initializes the in-memory rep. of the config file and parses the "LPGROUPS" section.

nmcglo commented 4 years ago

If someone ever wants to do this - feel free. But this isn't something I foresee being tackled unless it breaks something.