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

Update lilac config_machines.xml from version 2 to version 3. #2419

Open
ekluzek opened this issue Mar 12, 2024 · 1 comment
Open

Update lilac config_machines.xml from version 2 to version 3. #2419

ekluzek opened this issue Mar 12, 2024 · 1 comment
Labels
code health improving internal code structure to make easier to maintain (sustainability) enhancement new capability or improved behavior of existing capability priority: low Background task that doesn't need to be done right away.

Comments

@ekluzek
Copy link
Collaborator

ekluzek commented Mar 12, 2024

In ctsm5.1.dev172 we updated externals for config_machines.xml from version 2 to version 3. Right now both are allowed, but I expect eventually only version 3 will be supported. So we likely will need to switch at some point. And it will be easier to support if it's more similar to the way machines are currently setup in ccs_config/machines.

@billsacks and I worked out what we think needs to happen. The machine_configuration directory that's created needs a top level config_machines.xml file that will look something like this:

<config_machines version="3.0">
  <NODENAME_REGEX>
    <value MACH="ctsm-build">.*</value>
  </NODENAME_REGEX>

  <default_run_suffix>
    <default_run_exe>$CIME_OUTPUT_ROOT/case/bld/cesm.exe </default_run_exe>
    <default_run_misc_suffix> >> cesm.log 2>&amp;1 </default_run_misc_suffix>
  </default_run_suffix>

</config_machines>

beneath that will be a directory called "ctsm-build" for the LILAC generic machine with the normal contents of the config_machines.xml from before...

So something like...

  <machine MACH="ctsm-build">

    <!-- Text description of the machine -->
    <DESC>Temporary build information for a CTSM build</DESC>

    <!-- OS: the operating system of this machine. Passed to cppflags for
         compiled programs as -DVALUE  recognized are LINUX, AIX, Darwin, CNL -->
    <OS>$OS</OS>
.
.
.
  </machine>

I think the cmake macros file should also be in a cmake_macros subdirectory and named ctsm-build.cmake.

@ekluzek ekluzek added enhancement new capability or improved behavior of existing capability code health improving internal code structure to make easier to maintain (sustainability) priority: low Background task that doesn't need to be done right away. next this should get some attention in the next week or two. Normally each Thursday SE meeting. labels Mar 12, 2024
@billsacks
Copy link
Member

I'm not sure, but it might also work to skip nodename_regex (as we're currently doing, I think), and just put all of the config_machines stuff at the top level. That's what I have for my current machine port in my .cime directory. Also note that, even though the ccs_config stuff puts MACH.cmake files under cmake_macros, that isn't the case for a user-defined machine port like this, so I don't think that needs to move (and it might not work to move it). This is all a bit of speculation, though, since I haven't tested this with the lilac build myself.

@ekluzek ekluzek added priority: low Background task that doesn't need to be done right away. and removed priority: low Background task that doesn't need to be done right away. next this should get some attention in the next week or two. Normally each Thursday SE meeting. labels Mar 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code health improving internal code structure to make easier to maintain (sustainability) enhancement new capability or improved behavior of existing capability priority: low Background task that doesn't need to be done right away.
Projects
None yet
Development

No branches or pull requests

2 participants