def __init__(self, chartFun, isTemporal = False): self.isTemporal = isTemporal JPanel() #self.setBackground(Color.LIGHT_GRAY) self.chartFun = chartFun self.enableChartFun = False self.setLayout(GridLayout(6,2)) self.add(JLabel('CPU Cores')) nprocs = ManagementFactory.getOperatingSystemMXBean().getAvailableProcessors() procvals = sorted(set([nprocs, 1, 2, 4, 8, 16, 32, 64, 128])) cores = JComboBox(procvals) cores.setSelectedIndex(procvals.index(nprocs)) cores.setMaximumSize(cores.getPreferredSize()) self.cores = cores self.add(self.cores) self.add(JLabel('# of sims (x1000) ')) numSims = JComboBox( map(lambda x: str((10+x)*5), range(10)) + map(lambda x: str(x*100), range(1,11)) ) numSims.setMaximumSize(numSims.getPreferredSize()) self.numSims = numSims self.add(self.numSims) if isTemporal: self.add(JLabel('"Neutral" Ne')) self.neutral = JCheckBox() self.neutral.addActionListener(self) self.add(self.neutral) else: self.add(JLabel('"Neutral" mean Fst')) self.neutral = JCheckBox() self.neutral.addActionListener(self) self.add(self.neutral) self.add(JLabel('Force mean Fst')) self.force = JCheckBox() self.force.addActionListener(self) self.add(self.force) self.add(JLabel('Confidence interval ')) ci = JComboBox(['0.95', '0.99', '0.995']) ci.addItemListener(self) ci.setMaximumSize(cores.getPreferredSize()) self.ci = ci self.add(self.ci) self.add(JLabel('False Disc. Rate')) fdr = JFormattedTextField( NumberFormat.getNumberInstance(Locale.US)) fdr.setValue(0.1) fdr.addPropertyChangeListener(self) self.add(fdr) self.fdr = fdr
def __init__(self, chartFun, isTemporal = False): self.isTemporal = isTemporal JPanel() #self.setBackground(Color.LIGHT_GRAY) self.chartFun = chartFun self.enableChartFun = False self.setLayout(GridLayout(6,2)) self.add(JLabel('CPU Cores')) cores = JComboBox(['1', '2', '4', '8', '16', '32', '64', '128']) nprocs = ManagementFactory.getOperatingSystemMXBean().getAvailableProcessors() pos = min([7, log(ceil(nprocs)) / log(2)]) cores.setSelectedIndex(int(pos)) cores.setMaximumSize(cores.getPreferredSize()) self.cores = cores self.add(self.cores) self.add(JLabel('# of sims (x1000) ')) numSims = JComboBox( map(lambda x: str((10+x)*5), range(10)) + map(lambda x: str(x*100), range(1,11)) ) numSims.setMaximumSize(numSims.getPreferredSize()) self.numSims = numSims self.add(self.numSims) if isTemporal: self.add(JLabel('"Neutral" Ne')) self.neutral = JCheckBox() self.neutral.addActionListener(self) self.add(self.neutral) else: self.add(JLabel('"Neutral" mean Fst')) self.neutral = JCheckBox() self.neutral.addActionListener(self) self.add(self.neutral) self.add(JLabel('Force mean Fst')) self.force = JCheckBox() self.force.addActionListener(self) self.add(self.force) self.add(JLabel('Confidence interval ')) ci = JComboBox(['0.95', '0.99', '0.995']) ci.addItemListener(self) ci.setMaximumSize(cores.getPreferredSize()) self.ci = ci self.add(self.ci) self.add(JLabel('False Disc. Rate')) fdr = JFormattedTextField( NumberFormat.getNumberInstance(Locale.US)) fdr.setValue(0.1) fdr.addPropertyChangeListener(self) self.add(fdr) self.fdr = fdr
simDt = 0.005 #simDt= 0.01 # for newly added mep tests which will be used for omv tests with jNeuroML_NEURON neuroConstructSeed = 12345 simulatorSeed = 11111 #simulators = ["NEURON", "GENESIS_PHYS", "MOOSE_PHYS", "MOOSE_SI"] #"GENESIS_SI", #simulators = ["NEURON", "GENESIS_PHYS"] #"GENESIS_SI", #simulators = ["GENESIS", "MOOSE"] simulators = ["NEURON"] #maxElecLens = [0.01] # 0.01 will give ~700 in FRB & RS #maxElecLens = [-1] # -1 means don't recompartmentalise use settings in proj #maxElecLens = [0.025, 0.01,0.005, 0.0025, 0.001,0.0005, 0.00025, 0.0001] #### Note: the function testAll() below does not recompartmentalise the cells numConcurrentSims = ManagementFactory.getOperatingSystemMXBean( ).getAvailableProcessors() - 1 if mpiConfig != MpiSettings.LOCAL_SERIAL: numConcurrentSims = 60 suggestedRemoteRunTime = 80 # mins varTimestepNeuron = False # could be more accurate with var time step in nrn, but need to compare these to jNeuroML_NEURON varTimestepTolerance = 0.00001 analyseSims = True plotSims = True plotVoltageOnly = True simAllPrefix = "" # Adds a prefix to simulation reference runInBackground = True #(mpiConf == MpiSettings.LOCAL_SERIAL)
#simDt= 0.01 # for newly added mep tests which will be used for omv tests with jNeuroML_NEURON neuroConstructSeed = 12345 simulatorSeed = 11111 #simulators = ["NEURON", "GENESIS_PHYS", "MOOSE_PHYS", "MOOSE_SI"] #"GENESIS_SI", #simulators = ["NEURON", "GENESIS_PHYS"] #"GENESIS_SI", #simulators = ["GENESIS", "MOOSE"] simulators = ["NEURON"] #maxElecLens = [0.01] # 0.01 will give ~700 in FRB & RS #maxElecLens = [-1] # -1 means don't recompartmentalise use settings in proj #maxElecLens = [0.025, 0.01,0.005, 0.0025, 0.001,0.0005, 0.00025, 0.0001] #### Note: the function testAll() below does not recompartmentalise the cells numConcurrentSims = ManagementFactory.getOperatingSystemMXBean().getAvailableProcessors() -1 if mpiConfig != MpiSettings.LOCAL_SERIAL: numConcurrentSims = 60 suggestedRemoteRunTime = 80 # mins varTimestepNeuron = False # could be more accurate with var time step in nrn, but need to compare these to jNeuroML_NEURON varTimestepTolerance = 0.00001 analyseSims = True plotSims = True plotVoltageOnly = True simAllPrefix = "" # Adds a prefix to simulation reference
backend_pid = inv.getLong("backend_pid") con = Hiber.session().connection() stmt = con.createStatement() stmt.execute("select pg_terminate_backend(" + str(backend_pid) + ")") stmt.close() Hiber.commit() source.appendChild(MonadMessage("Cancelled backend.").toXml(doc)) df = DecimalFormat("###,###,###,###,##0") runtime = Runtime.getRuntime() source.setAttribute("free-memory", df.format(runtime.freeMemory())) source.setAttribute("max-memory", df.format(runtime.maxMemory())) source.setAttribute("total-memory", df.format(runtime.totalMemory())) source.setAttribute("available-processors", str(runtime.availableProcessors())) source.setAttribute("system-load-average", str(ManagementFactory.getOperatingSystemMXBean().getSystemLoadAverage())) mon = JavaSysMon() source.setAttribute("cpu-frequency-in-hz", df.format(mon.cpuFrequencyInHz())) source.setAttribute("current-pid", df.format(mon.currentPid())) source.setAttribute("num-cpus", df.format(mon.numCpus())) source.setAttribute("os-name", mon.osName()) source.setAttribute("uptime-in-seconds", df.format(mon.uptimeInSeconds())) cpu = mon.cpuTimes() source.setAttribute("idle-millis", df.format(cpu.getIdleMillis())) source.setAttribute("system-millis", df.format(cpu.getSystemMillis())) source.setAttribute("total-millis", df.format(cpu.getTotalMillis())) source.setAttribute("user-millis", df.format(cpu.getUserMillis())) props = doc.createElement("properties") source.appendChild(props)