mirror of https://gitlab.com/pamhyr/pamhyr2
cancel merge with master and update
parent
29b5c97345
commit
57be80bcd4
|
|
@ -9,6 +9,8 @@
|
||||||
*.class
|
*.class
|
||||||
|
|
||||||
tmp
|
tmp
|
||||||
|
mage8
|
||||||
|
adists
|
||||||
|
|
||||||
*.tar
|
*.tar
|
||||||
*.tar.*
|
*.tar.*
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,8 @@ import os
|
||||||
import logging
|
import logging
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
|
||||||
|
import shutil
|
||||||
|
|
||||||
from tools import (
|
from tools import (
|
||||||
trace, timer, logger_exception,
|
trace, timer, logger_exception,
|
||||||
timestamp_to_old_pamhyr_date,
|
timestamp_to_old_pamhyr_date,
|
||||||
|
|
@ -131,6 +133,12 @@ class AdisTS(CommandLineSolver):
|
||||||
|
|
||||||
self._export_REP_additional_lines(study, f)
|
self._export_REP_additional_lines(study, f)
|
||||||
|
|
||||||
|
path_mage_net = os.path.join(os.path.abspath(os.path.join(repertory, os.pardir)), f"default-mage/net")
|
||||||
|
path_adists_net = os.path.join(repertory, "net")
|
||||||
|
|
||||||
|
if os.path.exists(path_mage_net):
|
||||||
|
shutil.copytree(path_mage_net, path_adists_net, dirs_exist_ok=True)
|
||||||
|
|
||||||
@timer
|
@timer
|
||||||
def export(self, study, repertory, qlog=None):
|
def export(self, study, repertory, qlog=None):
|
||||||
self._study = study
|
self._study = study
|
||||||
|
|
|
||||||
|
|
@ -196,17 +196,11 @@ class CommandLineSolver(AbstractSolver):
|
||||||
The executable and list of arguments
|
The executable and list of arguments
|
||||||
"""
|
"""
|
||||||
cmd = cmd.replace("@install_dir", self._install_dir())
|
cmd = cmd.replace("@install_dir", self._install_dir())
|
||||||
print("format command installDir :", self._install_dir())
|
|
||||||
cmd = cmd.replace("@path", "\"" + path + "\"")
|
cmd = cmd.replace("@path", "\"" + path + "\"")
|
||||||
print("format command path :", path)
|
|
||||||
cmd = cmd.replace("@input", self.input_param().replace(" ", "_"))
|
cmd = cmd.replace("@input", self.input_param().replace(" ", "_"))
|
||||||
print("format command input :", self.input_param().replace(" ", "_"))
|
|
||||||
cmd = cmd.replace("@output", self.output_param())
|
cmd = cmd.replace("@output", self.output_param())
|
||||||
print("format command output :", self.output_param())
|
|
||||||
cmd = cmd.replace("@dir", self._process.workingDirectory())
|
cmd = cmd.replace("@dir", self._process.workingDirectory())
|
||||||
print("format command dir :", self._process.workingDirectory())
|
|
||||||
cmd = cmd.replace("@args", " ".join(self.cmd_args(study)))
|
cmd = cmd.replace("@args", " ".join(self.cmd_args(study)))
|
||||||
print("format command args :", " ".join(self.cmd_args(study)))
|
|
||||||
|
|
||||||
logger.debug(f"! {cmd}")
|
logger.debug(f"! {cmd}")
|
||||||
|
|
||||||
|
|
@ -243,11 +237,7 @@ class CommandLineSolver(AbstractSolver):
|
||||||
return True
|
return True
|
||||||
|
|
||||||
cmd = self._cmd_solver
|
cmd = self._cmd_solver
|
||||||
print("run solver commandline cmd : ", cmd)
|
|
||||||
print("path solver : ", self._path_solver)
|
|
||||||
exe, args = self._format_command(study, cmd, self._path_solver)
|
exe, args = self._format_command(study, cmd, self._path_solver)
|
||||||
print("parsed cmd solver exe : ", exe)
|
|
||||||
print("parsed cmd solver args : ", args)
|
|
||||||
|
|
||||||
if not os.path.exists(exe):
|
if not os.path.exists(exe):
|
||||||
error = f"[ERROR] Path {exe} do not exists"
|
error = f"[ERROR] Path {exe} do not exists"
|
||||||
|
|
@ -318,11 +308,6 @@ class CommandLineSolver(AbstractSolver):
|
||||||
self._output.put(res)
|
self._output.put(res)
|
||||||
|
|
||||||
def run(self, study, process=None, output_queue=None):
|
def run(self, study, process=None, output_queue=None):
|
||||||
print("Run debug")
|
|
||||||
print("---------")
|
|
||||||
print("cmd input : ", self._cmd_input)
|
|
||||||
print("cmd solver : ", self._cmd_solver)
|
|
||||||
print("cmd output : ", self._cmd_output)
|
|
||||||
self._study = study
|
self._study = study
|
||||||
|
|
||||||
# Replace old values if needed
|
# Replace old values if needed
|
||||||
|
|
|
||||||
|
|
@ -1261,8 +1261,9 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
|
||||||
if self._study is None:
|
if self._study is None:
|
||||||
return
|
return
|
||||||
|
|
||||||
#solver = next(filter(lambda x: x._type == "adistslc", self.conf.solvers))
|
solver = next(filter(lambda x: x._type == "adistslc", self.conf.solvers))
|
||||||
solver = next(filter(lambda x: x.name == "AdisTS-LC", self.conf.solvers))
|
#solver = next(filter(lambda x: x.name == "AdisTS-LC", self.conf.solvers))
|
||||||
|
print(solver._type)
|
||||||
self.run_solver(solver)
|
self.run_solver(solver)
|
||||||
|
|
||||||
def run_solver(self, solver):
|
def run_solver(self, solver):
|
||||||
|
|
|
||||||
|
|
@ -79,7 +79,9 @@ class SelectSolverWindow(PamhyrDialog):
|
||||||
self.select_last_solver()
|
self.select_last_solver()
|
||||||
|
|
||||||
def setup_combobox(self):
|
def setup_combobox(self):
|
||||||
solvers = self._config.solvers
|
#solvers = self._config.solvers
|
||||||
|
#solvers mage
|
||||||
|
solvers = list(filter(lambda x: "adists" not in x._type, self._config.solvers))
|
||||||
solvers_name = list(
|
solvers_name = list(
|
||||||
map(
|
map(
|
||||||
self._format_solver_name,
|
self._format_solver_name,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue