-
Notifications
You must be signed in to change notification settings - Fork 6
DM-54449: updates for mempercore, peakmemory #48
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -109,15 +109,29 @@ def __init__( | |
| self.defaults["USER_SCRATCH"] = user_scratch | ||
| self.commandLineDefaults = {} | ||
| self.commandLineDefaults["NODE_COUNT"] = self.opts.nodeCount | ||
| self.commandLineDefaults["COLLECTOR"] = self.opts.collector | ||
| if self.configuration.platform.collector: | ||
| self.commandLineDefaults["COLLECTOR"] = self.configuration.platform.collector | ||
| if self.opts.collector: | ||
| self.commandLineDefaults["COLLECTOR"] = self.opts.collector | ||
| self.commandLineDefaults["CPORT"] = self.opts.collectorport | ||
| if self.configuration.platform.peakcpus: | ||
| self.commandLineDefaults["PEAKCPUS"] = self.configuration.platform.peakcpus | ||
| else: | ||
| self.commandLineDefaults["PEAKCPUS"] = 256 | ||
| if self.configuration.platform.peakmemory: | ||
| self.commandLineDefaults["PEAKMEMORY"] = self.configuration.platform.peakmemory | ||
| else: | ||
| self.commandLineDefaults["PEAKMEMORY"] = 1000000 | ||
| if self.opts.exclusive: | ||
| self.commandLineDefaults["CPUS"] = self.configuration.platform.peakcpus | ||
| else: | ||
| self.commandLineDefaults["CPUS"] = self.opts.cpus | ||
| if self.opts.cpus < self.configuration.platform.peakcpus: | ||
| self.commandLineDefaults["CPUS"] = self.opts.cpus | ||
| else: | ||
| self.commandLineDefaults["CPUS"] = self.configuration.platform.peakcpus | ||
| self.commandLineDefaults["WALL_CLOCK"] = self.opts.maximumWallClock | ||
| self.commandLineDefaults["ACCOUNT"] = self.opts.account | ||
| self.commandLineDefaults["MEMPERCORE"] = 4096 | ||
| self.commandLineDefaults["MEMPERCORE"] = self.opts.mempercore | ||
| self.commandLineDefaults["ALLOWEDAUTO"] = 500 | ||
| self.commandLineDefaults["AUTOCPUS"] = 16 | ||
| self.commandLineDefaults["MINAUTOCPUS"] = 15 | ||
|
|
@@ -223,7 +237,7 @@ def createSubmitFile(self, inputFile): | |
| if not os.path.exists(self.configDir): | ||
| os.makedirs(self.configDir) | ||
| outfile = self.createFile(inputFile, self.submitFileName) | ||
| _LOG.debug("Wrote new Slurm submit file to %s", outfile) | ||
| _LOG.debug("Wrote new submit file to %s", outfile) | ||
| return outfile | ||
|
|
||
| def createCondorConfigFile(self, input): | ||
|
|
@@ -350,6 +364,21 @@ def getCPUs(self): | |
| """ | ||
| return self.getParameter("CPUS") | ||
|
|
||
| def getPeakcpus(self): | ||
| """Accessor for PEAKCPUS | ||
| @return the value of PEAKCPUS | ||
| """ | ||
| return self.getParameter("PEAKCPUS") | ||
|
|
||
| def getPeakmemory(self): | ||
| """Accessor for PEAKMEMORY | ||
| @return the value of PEAKMEMORY | ||
| """ | ||
| peakmemory = self.getParameter("PEAKMEMORY") | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does getParameter guarantee a value (the default in the pex config is None) |
||
| if self.opts.queue == "torino": | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This conversion seems like it should be in the platform specific package instead of the generic allocator package. Is there a config way to have peak information per queue? |
||
| peakmemory = int(3 * peakmemory / 2) | ||
| return peakmemory | ||
|
|
||
| def getAutoCPUs(self): | ||
| """Size of standard glideins for allocateNodes auto | ||
| @return the value of autoCPUs | ||
|
|
@@ -366,6 +395,12 @@ def getMinAutoCPUs(self): | |
| """ | ||
| return self.getParameter("MINAUTOCPUS") | ||
|
|
||
| def getCollector(self): | ||
| """Accessor for COLLECTOR | ||
| @return the value of COLLECTOR | ||
| """ | ||
| return self.getParameter("COLLECTOR") | ||
|
|
||
| def getWallClock(self): | ||
| """Accessor for WALL_CLOCK | ||
| @return the value of WALL_CLOCK | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LSST Developer Guide describes the format for docstrings (mostly Numpydoc style)