Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

resource configuration through a ~/.mintpyrc file #1255

Open
1 task
falkamelung opened this issue Aug 27, 2024 · 1 comment
Open
1 task

resource configuration through a ~/.mintpyrc file #1255

falkamelung opened this issue Aug 27, 2024 · 1 comment

Comments

@falkamelung
Copy link
Contributor

Description of the desired feature

Currently it is not practical to use the same custom template file (e.g. FernandinaSenD128.template) on different platforms (on a HPC system and on your laptop) as it contains these system-related parameters:

mintpy.compute.maxMemory = auto #[float > 0.0], auto for 4, max memory to allocate in GB
mintpy.compute.numWorker = auto #[int > 1 / all / num%], auto for 4 (local) or 40 (slurm / pbs / lsf), num of workers
mintpy.plot.maxMemory = auto  #[float], auto for 4, max memory used by one call of view.py for plotting.

It would be nice to have the option to configure these parameters for each platform individually through an ~/mintpyrc in the home directory. That looks to be easy to implement: when filling parameters with the default values from defaults/smallbaselineApp_auto.cfg it should check for a ~/mintpyrc or ~/smallbaselineApprc.

Would that be of interest? If so, please add suggestions if you have (including naming preference).

Are you willing to help implement and maintain this feature?

  • [X ] Yes
  • No
@yunjunz yunjunz changed the title resource configuration through .mintpyrc resource configuration through a ~/.mintpyrc file Aug 30, 2024
@yunjunz
Copy link
Member

yunjunz commented Aug 30, 2024

I like this ~/.mintpyrc file idea, and it won't affect any existing functionalities. You are more than welcome to implement it @falkamelung.

For the implementation, I would think it should be: whenever the template option value is auto, which means users have not modified it (as one could have specified a custom value, which by incidence is the default value), the code should check the existence of the ~/.mintpyrc file and use it instead of the defaults/smallbaseline_auto.cfg file. This can be done within the utils.utils1.check_template_auto_value().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants