phoebe
Advanced tools
| Metadata-Version: 2.4 | ||
| Name: phoebe | ||
| Version: 2.4.19 | ||
| Version: 2.4.20 | ||
| Summary: PHOEBE: modeling and analysis of eclipsing binary stars | ||
@@ -127,4 +127,12 @@ Author-email: Andrej Prša <aprsa@villanova.edu>, Kyle Conroy <kyle.conroy@villanova.edu>, Angela Kochoska <angela.kochoska@villanova.edu>, Martin Horvat <martin.horvat@fmf.uni-lj.si>, Dave Jones <djones@iac.es>, Michael Abdul-Masih <michael.abdul-masih@eso.org>, Bert Pablo <hpablo@aavso.org>, Joe Giammarco <giammarc@eastern.edu> | ||
| ### 2.4.20 | ||
| * Fix parse_solver_times compatibility with numpy > 1.24. [#1056] | ||
| * Update crimpl to allow custom MPI paths on the server and to use conda-forge as the default conda channel to avoid the need to agree to terms of the default channel. [#1055] | ||
| ### 2.4.19 | ||
| * Remove unused passband files [#1045] | ||
| ### 2.4.18 | ||
@@ -131,0 +139,0 @@ |
@@ -20,3 +20,3 @@ """ | ||
| __version__ = '2.4.19' | ||
| __version__ = '2.4.20' | ||
@@ -23,0 +23,0 @@ import os as _os |
@@ -39,7 +39,9 @@ from datetime import datetime as _datetime | ||
| class Server(object): | ||
| def __init__(self, directory=None): | ||
| def __init__(self, directory=None, openmpi_path=None, openmpi_ld_library_path=None): | ||
| self._directory = directory | ||
| self._directory_exists = False | ||
| self._openmpi_path = openmpi_path | ||
| self._openmpi_ld_library_path = openmpi_ld_library_path | ||
| self._dict_keys = ['directory'] | ||
| self._dict_keys = ['directory', 'openmpi_path', 'openmpi_ld_library_path'] | ||
@@ -75,2 +77,10 @@ def __repr__(self): | ||
| @property | ||
| def openmpi_path(self): | ||
| return self._openmpi_path | ||
| @property | ||
| def openmpi_ld_library_path(self): | ||
| return self._openmpi_ld_library_path | ||
| @property | ||
| def existing_jobs(self): | ||
@@ -188,3 +198,3 @@ """ | ||
| default_deps = "pip numpy" | ||
| default_deps = "pip" | ||
@@ -211,3 +221,3 @@ if not (isinstance(conda_env, str) or conda_env is None): | ||
| # create the environment at the server level | ||
| cmd += "conda create -p {envpath_server} -y {default_deps} python={python_version}; ".format(envpath_server=envpath_server, default_deps=default_deps, python_version=python_version) | ||
| cmd += "conda create -p {envpath_server} -y {default_deps} python={python_version} --override-channels -c conda-forge -y; ".format(envpath_server=envpath_server, default_deps=default_deps, python_version=python_version) | ||
| if len(cmd) or job_name not in conda_envs_dict.get(conda_env): | ||
@@ -227,3 +237,3 @@ # clone the server environment at the job level | ||
| envpath = _os.path.join(self.directory, "crimpl-envs", conda_env) | ||
| cmd = "conda create -p {envpath} -y {default_deps} python>={python_version}".format(envpath=envpath, default_deps=default_deps, python_version=python_version) | ||
| cmd = "conda create -p {envpath} -y {default_deps} python={python_version} --override-channels -c conda-forge -y".format(envpath=envpath, default_deps=default_deps, python_version=python_version) | ||
@@ -235,3 +245,2 @@ if run_cmd: | ||
| def _create_crimpl_directory(self): | ||
@@ -249,3 +258,7 @@ | ||
| f = open('exportpath.sh', 'w') | ||
| f.write('export PATH="{}/crimpl-bin:$PATH"'.format(self.directory.replace("~", "$HOME"))) | ||
| f.write(f'export PATH="{self.directory.replace("~", "$HOME")}/crimpl-bin:$PATH"\n') | ||
| if self.openmpi_path: | ||
| f.write(f'export PATH="{self.openmpi_path}:$PATH"\n') | ||
| if self.openmpi_ld_library_path: | ||
| f.write(f'export LD_LIBRARY_PATH="{self.openmpi_ld_library_path}:$LD_LIBRARY_PATH"\n') | ||
| f.close() | ||
@@ -258,3 +271,2 @@ scp_cmd = self.scp_cmd_to.format(local_path='exportpath.sh', server_path=self.directory+"/") | ||
| def install_conda(self, in_server_directory=False): | ||
@@ -281,6 +293,26 @@ """ | ||
| python_version = "{}.{}".format(_sys.version_info.major, _sys.version_info.minor) | ||
| if in_server_directory: | ||
| out = self._run_server_cmd("cd {directory}; wget -q https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh; sh Miniconda3-latest-Linux-x86_64.sh -u -b -p ./crimpl-conda; mkdir ./crimpl-bin; cp ./crimpl-conda/bin/conda ./crimpl-bin/conda".format(directory=self.directory, exportpath=False)) | ||
| out = self._run_server_cmd( | ||
| "cd {directory}; " | ||
| "wget -q https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh; " | ||
| "sh Miniconda3-latest-Linux-x86_64.sh -u -b -p ./crimpl-conda; " | ||
| "mkdir ./crimpl-bin; " | ||
| "cp ./crimpl-conda/bin/conda ./crimpl-bin/conda; " | ||
| "./crimpl-conda/bin/conda config --set auto_activate_base false; ".format( | ||
| directory=self.directory, python_version=python_version | ||
| ) | ||
| ) | ||
| else: | ||
| out = self._run_server_cmd("cd {directory}; wget -q https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh; sh Miniconda3-latest-Linux-x86_64.sh -u -b; mkdir ./crimpl-bin; cp ~/miniconda3/bin/conda ./crimpl-bin".format(directory=self.directory, exportpath=False)) | ||
| out = self._run_server_cmd( | ||
| "cd {directory}; " | ||
| "wget -q https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh; " | ||
| "sh Miniconda3-latest-Linux-x86_64.sh -u -b; " | ||
| "mkdir ./crimpl-bin; " | ||
| "cp ~/miniconda3/bin/conda ./crimpl-bin; " | ||
| "./crimpl-conda/bin/conda config --set auto_activate_base false; ".format( | ||
| directory=self.directory, python_version=python_version | ||
| ) | ||
| ) | ||
| out = self._run_server_cmd("conda init") | ||
@@ -287,0 +319,0 @@ |
@@ -404,3 +404,4 @@ | ||
| def __init__(self, host, directory='~/crimpl', ssh='ssh', scp='scp', | ||
| mail_user=None, server_name=None): | ||
| mail_user=None, server_name=None, openmpi_path=None, | ||
| openmpi_ld_library_path=None): | ||
| """ | ||
@@ -429,4 +430,11 @@ Connect to a remote server running a Slurm scheduler. | ||
| <RemoteSlurmServer.server_name>. | ||
| * `openmpi_path` (string, optional, default=None): path to the OpenMPI | ||
| installation on the remote server. If provided, will be added to | ||
| the PATH environment variable when running scripts on the server. | ||
| * `openmpi_ld_library_path` (string, optional, default=None): path to | ||
| the OpenMPI library on the remote server. If provided, will be added | ||
| to the LD_LIBRARY_PATH environment variable when running scripts | ||
| on the server. | ||
| """ | ||
| super().__init__(host, directory, ssh, scp) | ||
| super().__init__(host, directory, openmpi_path=openmpi_path, openmpi_ld_library_path=openmpi_ld_library_path, ssh=ssh, scp=scp) | ||
| self.mail_user = mail_user | ||
@@ -433,0 +441,0 @@ self._dict_keys += ['mail_user'] |
@@ -251,3 +251,4 @@ | ||
| def __init__(self, host, directory='~/crimpl', ssh='ssh', scp='scp', | ||
| server_name=None): | ||
| server_name=None, openmpi_path=None, | ||
| openmpi_ld_library_path=None): | ||
| """ | ||
@@ -273,2 +274,9 @@ Connect to a remote server running jobs in threads (no scheduler). | ||
| <RemoteThreadServer.server_name>. | ||
| * `openmpi_path` (string, optional, default=None): path to the OpenMPI | ||
| installation on the remote server. If provided, will be added to | ||
| the PATH environment variable when running scripts on the server. | ||
| * `openmpi_ld_library_path` (string, optional, default=None): path to | ||
| the OpenMPI library on the remote server. If provided, will be added | ||
| to the LD_LIBRARY_PATH environment variable when running scripts | ||
| on the server. | ||
| """ | ||
@@ -282,6 +290,8 @@ self._host = host | ||
| self._scp = scp | ||
| self._openmpi_path = openmpi_path | ||
| self._openmpi_ld_library_path = openmpi_ld_library_path | ||
| self._server_name = server_name | ||
| super().__init__(directory) | ||
| self._dict_keys = ['host', 'directory', 'ssh', 'scp'] | ||
| super().__init__(directory, openmpi_path=openmpi_path, openmpi_ld_library_path=openmpi_ld_library_path) | ||
| self._dict_keys = ['host', 'directory', 'ssh', 'scp', 'openmpi_path', 'openmpi_ld_library_path'] | ||
@@ -312,2 +322,24 @@ @property | ||
| @property | ||
| def openmpi_path(self): | ||
| """ | ||
| Path to the OpenMPI installation on the remote server. | ||
| Returns | ||
| ---------- | ||
| * (string or None): path to OpenMPI or None if not set. | ||
| """ | ||
| return self._openmpi_path | ||
| @property | ||
| def openmpi_ld_library_path(self): | ||
| """ | ||
| Path to the OpenMPI library on the remote server. | ||
| Returns | ||
| ---------- | ||
| * (string or None): path to OpenMPI library or None if not set. | ||
| """ | ||
| return self._openmpi_ld_library_path | ||
| @property | ||
| def _ssh_cmd(self): | ||
@@ -314,0 +346,0 @@ """ |
+9
-1
| Metadata-Version: 2.4 | ||
| Name: phoebe | ||
| Version: 2.4.19 | ||
| Version: 2.4.20 | ||
| Summary: PHOEBE: modeling and analysis of eclipsing binary stars | ||
@@ -127,4 +127,12 @@ Author-email: Andrej Prša <aprsa@villanova.edu>, Kyle Conroy <kyle.conroy@villanova.edu>, Angela Kochoska <angela.kochoska@villanova.edu>, Martin Horvat <martin.horvat@fmf.uni-lj.si>, Dave Jones <djones@iac.es>, Michael Abdul-Masih <michael.abdul-masih@eso.org>, Bert Pablo <hpablo@aavso.org>, Joe Giammarco <giammarc@eastern.edu> | ||
| ### 2.4.20 | ||
| * Fix parse_solver_times compatibility with numpy > 1.24. [#1056] | ||
| * Update crimpl to allow custom MPI paths on the server and to use conda-forge as the default conda channel to avoid the need to agree to terms of the default channel. [#1055] | ||
| ### 2.4.19 | ||
| * Remove unused passband files [#1045] | ||
| ### 2.4.18 | ||
@@ -131,0 +139,0 @@ |
+1
-1
@@ -14,3 +14,3 @@ # PHOEBE build specification | ||
| name = "phoebe" | ||
| version = "2.4.19" | ||
| version = "2.4.20" | ||
| description = "PHOEBE: modeling and analysis of eclipsing binary stars" | ||
@@ -17,0 +17,0 @@ readme = "README.md" |
+8
-0
@@ -81,4 +81,12 @@ PHOEBE 2.4 | ||
| ### 2.4.20 | ||
| * Fix parse_solver_times compatibility with numpy > 1.24. [#1056] | ||
| * Update crimpl to allow custom MPI paths on the server and to use conda-forge as the default conda channel to avoid the need to agree to terms of the default channel. [#1055] | ||
| ### 2.4.19 | ||
| * Remove unused passband files [#1045] | ||
| ### 2.4.18 | ||
@@ -85,0 +93,0 @@ |
Sorry, the diff of this file is too big to display
Alert delta unavailable
Currently unable to show alert delta for PyPI packages.
82825827
0.01%65587
0.1%