Put user-specific parts from profile into a separate file
Hi, would it be possible to extract those things in the profile that are user specific and shall remain constant between version changes (e.g. mail address, editor (maybe src directory) ) into e separate file, so that one can easily switch between different picongpu versions/profiles?
I think i understand the radionale. E.g. a user already made a copy of the profile to their home directory and set source path, mail notifications and such. And then when a profile gets updated in the main repository, one needs to apply same changes again or somehow manually merge with old profile to keep the established workflow.
I am not sure what would be a good solution. Splitting profile is also dangerous, as then it's more likely that the run will use a different environment from compilation. @psychocoderHPC do you have an idea?
Maybe a solution could be to have a hook in all profiles that load user-provided stuff inside? So that a user could define a path to their profile that we will always load as part of our profile. E.g. do it between these two lines.
Not sure if this brings more good than harm. I guess experienced users may benefit from it, but also for some it may become even more complicated
User variables can already be changed without changing the profiles if you add those to a separate bash file you source. This would be a "workaround", not sure if moving these variables to a separate file will simplify the process but we should brainstorm about possible simplifications.
https://github.com/ComputationalRadiationPhysics/picongpu/blob/34349b56a5b14b96ca7d256bca369dbb8a662550/etc/picongpu/crusher-ornl/batch.tpl#L48-L52
If you define an environment variable you can overwrite what's set in the profile.
example:
source etc/picongpu/crusher-ornl/atch_craycc_picongpu.profile.example
export PROJID=123456
export [email protected]
export MY_MAILNOTIFY=ALL
@psychocoderHPC this is true, but e.g. it is not possible to set a custom PICSRC this way, as the profile already uses its own PICSRC to set PATH and PIC_EXAMPLES. And the worst part is that a user may not realize it and still set their PICSRC afterwards via export which would result in an inconsistent configuration.
@psychocoderHPC and is this the case in all the profiles now? I'm asking because I have a profile here that has those variable hardcoded, but probably it is an old version. Otherwise, the above solution works and this issue can be closed.
Closing this issue now, as it seems more dangerous/confusing to split profile definitions across several files, while updating a profile is a simple copy-paste task.
The idea of the profile is, to bundle all user specific definitions. A picongpu triggered update of the profile represents just one reason to update it, environment software updates, path changes or similar represent other reasons. Splitting the file in several entities would increase the required knowledge by users where to change what in the respective cases, which seems to counteract the original idea of the question.
@HighIander feel free to reopen the issue with a more concrete proposal of action or a PR.