OrderN / CONQUEST-release

Full public release of large scale and linear scaling DFT code CONQUEST
http://www.order-n.org/
MIT License
94 stars 24 forks source link

Change system.make approach in Makefile #332

Closed davidbowler closed 2 months ago

davidbowler commented 2 months ago

At the moment, the Makefile uses the command hostname -d to identify a system and uses a system.make file based on that name. However, the command has been found to behave differently on different platforms, and some HPC centres are concerned about giving out hostnames.

The suggestion is that we default to system.make by setting the variable SYSTEM to be blank; the user can give the command make SYSTEM=name to use the system.name.make file if they wish, or simply or edit copy an appropriate system.make template file. In this case we should not have a system.make file in the repository (so that users need to select an appropriate file).

We should include some form of documentation for the templates: either in a README.md file or in a header (or even both!).

tkoskela commented 2 months ago

Currently the Makefile defaults to system.make if the variable SYSTEM is blank. This happens e.g. on my laptop because hostname -d returns nothing, but obviously if hostname -d returns a value but you want to ignore it you'd have to set SYSTEM= on the command line. We could change this to be the default behaviour and have the user set SYSTEM on the command line in order to use one of the files in the system directory, if that's preferable. The file system.make is in the root .gitignore so it is not being version controlled. The system.example.make is intended to be a template you can start from.

A couple of slightly tangential points I want to mention

  1. We should think about what should be in the system.make files and what shouldn't, see #329
  2. Rather than having the system-specific config set by the user, we should really be using autotools or cmake to detect them automatically. That would resolve many problems.
davidbowler commented 2 months ago

After discussing this with the other core team members, we have decided that we will tweak this approach slightly so that system.make is the default name, but can be changed using make SYSTEM=name. I'll open a branch and do this in the next day or two so that we can release v1.3, and other tweaks to the Makefile can follow.

davidbowler commented 2 months ago

Closed by #335