PyXMake Developer Guide: PyXMake.Build.Make.SSH Class Reference

| PyXMake Developer Guide 1.0 PyXMake

Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
PyXMake.Build.Make.SSH Class Reference

Base class for all build events requiring a SSH connection. More...

Inheritance diagram for PyXMake.Build.Make.SSH:

## Public Member Functions
| __init__ (self, *args, **kwargs)
| OutputPath (self, libpath, modulepath=None)
| Settings (self, user, key="", host='129.247.54.37', port=22, use_cache=True, **kwargs)
| Environment (self, path="", bash="", args="", method="source")
| Postprocessing (self, cmdstring="")
| Build (self, cmdstring, run="ifort", path="", lib="", linkedIn="", **kwargs)
| create (self, **kwargs)
Public Member Functions inherited from PyXMake.Build.Make.Make
| __posix__ (self, **kwargs)
| AddIncludePath (self, includes)
| AddDependencyPath (self, dependencies)
| UseLibraries (self, libs)
| SourcePath (self, path)
| Preprocessing (self, cmdstring='', inend='', outend='', copyfiles=[], replace={'!DEC$ IF':'#IF','!DEC$ ELSE':'#ELSE','!DEC$ ENDIF':'#ENDIF'})
| run (cls, **kwargs)
Public Member Functions inherited from PyXMake.Tools.Utility.AbstractBase
| __new__ (cls, *args, **kwargs)
| recover (cls, *args)
| classify (cls, *args, **kwargs)
| jsonify (self)
| update (self, **kwargs)
| __repr__ (self)
| __str__ (self)
| __getstate__ (self)
| __setstate__ (self, _dict)

## Public Attributes
str | intermediate_wrapper = ""
| Wrapper interface file for 3rd party FORTRAN code.
str | wrapper_source = ""
str | wrapper_module = "pyx_module.f90"
str | MakeObjectKind = 'SSH'
| String identifier of current instance.
str | libname = "lib"+self.buildid + self.architecture
| Name of library, assembled using BuildID.
str | buildname = self.buildid+'_ssh'
| Temporary build name.
str | export = "export CPATH=$CPATH"
| Environment variables to be set prior to the execution of the build command.
| incremental = kwargs.get('incremental', False)
| Define if the input should be compiled exactly as provided.
list | linkedIn = []
| List of libraries which should be statically linked in.
tuple | temps = ()
| Blank version of tuple to store temporary file names scheduled for removal.
str | environment = ""
| Load an additional library prior to execution of all commands.
list | libdirs = []
| Blank version of list containing library directories.
| outmodule = modulepath + posixpath.sep
| Output path for module or header files.
| outlibs = libpath + posixpath.sep
| Output path for library files.
| ssh_client = kwargs.get("client");
| Remote workspace.
| workspace = kwargs.get("workspace",posixpath.join(sftp.getcwd(),"")); sftp.close()
| Remote workspace.
str | postcmd = cmdstring
| Command executed during post-build event.
| libs = list(Utility.ArbitraryFlattening(self.libs))
| path2exe = run
| (Intel Fortran) Compiler Path
list | incremental = [x for x in self.srcs if os.path.splitext(x)[1].lower() in (".for", ".f95", ".f", ".f90")]
str | exe
str | makecmd = posixpath.join(self.path2exe,self.exe)+" -c "+ cmd + cmdstring
| Remote (Intel) Compiler command.
str | linkcmd = ""
| Remote Linker command.
| scrtdir = self.scrtdir)
| precmd = '':
| verbose
| srcs
str | command = self.environment + self.export + " && cd "+self.workspace+ " && " + self.makecmd
Public Attributes inherited from PyXMake.Build.Make.Make
| buildid = BuildID
| Base string of build object.
list | srcs = []
| Source file or folders.
list | bare = not BuildID and not self.srcs
| stype = kwargs.get("stype",'Fortran')
| Source file type.
| verbose = verbose
| Level of verbosity of the current build object.
| hasFoss = kwargs.get("foss", Utility.GetExecutable("choco") or Utility.GetPlatform() in ["linux"] or kwargs.get("bash",False))
| Toggle between free open source software and commercial 3rd party libraries.
| scrtdir = os.getcwd()
| Current scratch directory
| srcdir = os.getcwd()
| Default search directory for source files.
| outdir = os.getcwd()
| Default search directory for output.
_, self.intelpath, self.iniCompiler | intelpath = content
| Path to Intel Fortran Compiler (read from Paths.log or empty).
tuple | temps = ()
| Tuple of data to be removed after job completion.
list | incdirs = []
| List of include directories.
list | libdirs = []
| List of library directories.
list | libs = []
| List of actual libraries (by name) used during linking.
list | copyfiles = []
| List of files to be copied to the output directory after finish.
str | iniCompiler = ""
| Default initialization of compiler script.
bool | setarch = True if kwargs.get('arch', None) in ['x86', 'x64'] else False
| Define the architecture for the build directly by using the keyword argument "arch".
| msvsc = kwargs.get("msvsc",'vs2015')
| Default version of Microsoft visual studio used by the Intel Fortran Compiler.
str | architecture = 'x86'
| Processor architecture.
str | postcmd = ""
| Post build command.
| buildname = self.temps + (inputfile, )
str | precmd = self.iniCompiler+" "+cmdstring
| Command executed during pre-build event.
| compargs = cmdstring
| Command line arguments passed in by the user.
str | makecmd = self.iniCompiler+" "+os.path.join(self.path2exe,self.exe)+" "+ cmd + cmdstring
| Command executed during build event.
| mkl_dependency

## Additional Inherited Members
Static Public Member Functions inherited from PyXMake.Build.Make.Make
| __parser__ ()
| Detach ()
| F2CPreprocessing (PreprocessingFile)
| sanitize (string, **kwargs)
| setup (*args, **kwargs)
Static Public Member Functions inherited from PyXMake.Tools.Utility.AbstractBase
| __getbase__ (base, cls)
Protected Attributes inherited from PyXMake.Build.Make.Make
list | _mkl_includes = [x for x in self.incdirs if "mkl" in x]

## Detailed Description

Base class for all build events requiring a SSH connection.

    Inherited class for all builds using SSH connection.

Inherited from Make.

## Constructor & Destructor Documentation

## ◆ __init__()

PyXMake.Build.Make.SSH.__init__ | ( |  | self,
|  | * | args,
|  | ** | kwargs )

    Initialization of SSH class object.

Reimplemented from PyXMake.Build.Make.Make.

Definition at line 4214 of file Make.py.

## Member Function Documentation

## ◆ Build()

PyXMake.Build.Make.SSH.Build | ( |  | self,
|  |  | cmdstring,
|  |  | run = "ifort",
|  |  | path = "",
|  |  | lib = "",
|  |  | linkedIn = "",
|  | ** | kwargs )

    Assemble command strings for the main build event.

Reimplemented from PyXMake.Build.Make.Make.

Definition at line 4343 of file Make.py.

## ◆ create()

PyXMake.Build.Make.SSH.create | ( |  | self,
|  | ** | kwargs )

    Define settings to establish SSH connection.

Reimplemented from PyXMake.Build.Make.Make.

Definition at line 4399 of file Make.py.

## ◆ Environment()

PyXMake.Build.Make.SSH.Environment | ( |  | self,
|  |  | path = "",
|  |  | bash = "",
|  |  | args = "",
|  |  | method = "source" )

    Load an additional environment file prior to execution of all commands.

Reimplemented from PyXMake.Build.Make.Make.

Definition at line 4325 of file Make.py.

## ◆ OutputPath()

PyXMake.Build.Make.SSH.OutputPath | ( |  | self,
|  |  | libpath,
|  |  | modulepath = None )

    Define output directories for modules and libraries. Output written to the workspace is DELETED.

Reimplemented from PyXMake.Build.Make.Make.

Definition at line 4267 of file Make.py.

## ◆ Postprocessing()

PyXMake.Build.Make.SSH.Postprocessing | ( |  | self,
|  |  | cmdstring = "" )

    Assemble command string for the post-build event.

Reimplemented from PyXMake.Build.Make.Make.

Definition at line 4335 of file Make.py.

## ◆ Settings()

PyXMake.Build.Make.SSH.Settings | ( |  | self,
|  |  | user,
|  |  | key = "",
|  |  | host = '129.247.54.37',
|  |  | port = 22,
|  |  | use_cache = True,
|  | ** | kwargs )

    Define settings to establish a SSH connection.

Definition at line 4280 of file Make.py.

## Member Data Documentation

## ◆ buildname

PyXMake.Build.Make.SSH.buildname = self.buildid+'_ssh'

Temporary build name.

Definition at line 4236 of file Make.py.

## ◆ command

str PyXMake.Build.Make.SSH.command = self.environment + self.export + " && cd "+self.workspace+ " && " + self.makecmd

Definition at line 4473 of file Make.py.

## ◆ environment

str PyXMake.Build.Make.SSH.environment = ""

Load an additional library prior to execution of all commands.

Defaults to an empty string.

Definition at line 4259 of file Make.py.

## ◆ exe

str PyXMake.Build.Make.SSH.exe

Definition at line 4372 of file Make.py.

## ◆ export

str PyXMake.Build.Make.SSH.export = "export CPATH=$CPATH"

Environment variables to be set prior to the execution of the build command.

Intel Fortran 12+

Definition at line 4238 of file Make.py.

## ◆ incremental [1/2]

PyXMake.Build.Make.SSH.incremental = kwargs.get('incremental', False)

Define if the input should be compiled exactly as provided.

Defaults to False, meaning that merging & pre-processing utilities will be carried out.

Definition at line 4248 of file Make.py.

## ◆ incremental [2/2]

list PyXMake.Build.Make.SSH.incremental = [x for x in self.srcs if os.path.splitext(x)[1].lower() in (".for", ".f95", ".f", ".f90")]

Definition at line 4367 of file Make.py.

## ◆ intermediate_wrapper

PyXMake.Build.Make.SSH.intermediate_wrapper = ""

Wrapper interface file for 3rd party FORTRAN code.

Automatically creates a module of the underlying source material.

Definition at line 4225 of file Make.py.

## ◆ libdirs

list PyXMake.Build.Make.SSH.libdirs = []

Blank version of list containing library directories.

MKL library has been removed since location on the SSH remote computer is not known a priori.

Definition at line 4264 of file Make.py.

## ◆ libname

str PyXMake.Build.Make.SSH.libname = "lib"+self.buildid + self.architecture

Name of library, assembled using BuildID.

Definition at line 4234 of file Make.py.

## ◆ libs

PyXMake.Build.Make.SSH.libs = list(Utility.ArbitraryFlattening(self.libs))

Definition at line 4351 of file Make.py.

## ◆ linkcmd

PyXMake.Build.Make.SSH.linkcmd = ""

Remote Linker command.

Do no use any archiver

Definition at line 4390 of file Make.py.

## ◆ linkedIn

list PyXMake.Build.Make.SSH.linkedIn = []

List of libraries which should be statically linked in.

Definition at line 4252 of file Make.py.

## ◆ makecmd

str PyXMake.Build.Make.SSH.makecmd = posixpath.join(self.path2exe,self.exe)+" -c "+ cmd + cmdstring

Remote (Intel) Compiler command.

Definition at line 4383 of file Make.py.

## ◆ MakeObjectKind

str PyXMake.Build.Make.SSH.MakeObjectKind = 'SSH'

String identifier of current instance.

Definition at line 4230 of file Make.py.

## ◆ outlibs

PyXMake.Build.Make.SSH.outlibs = libpath + posixpath.sep

Output path for library files.

Definition at line 4277 of file Make.py.

## ◆ outmodule

PyXMake.Build.Make.SSH.outmodule = modulepath + posixpath.sep

Output path for module or header files.

Definition at line 4275 of file Make.py.

## ◆ path2exe

PyXMake.Build.Make.SSH.path2exe = run

(Intel Fortran) Compiler Path

Definition at line 4359 of file Make.py.

## ◆ postcmd

str PyXMake.Build.Make.SSH.postcmd = cmdstring

Command executed during post-build event.

Definition at line 4340 of file Make.py.

## ◆ precmd

PyXMake.Build.Make.SSH.precmd = '':

Definition at line 4438 of file Make.py.

## ◆ scrtdir

PyXMake.Build.Make.SSH.scrtdir = self.scrtdir)

Definition at line 4433 of file Make.py.

## ◆ srcs

PyXMake.Build.Make.SSH.srcs

Definition at line 4456 of file Make.py.

## ◆ ssh_client

PyXMake.Build.Make.SSH.ssh_client = kwargs.get("client");

Remote workspace.

This is the scratch directory for the build event. Defaults to /home/user/.

Instance of SSHClient to establish a SSH connection.

Definition at line 4287 of file Make.py.

## ◆ temps

PyXMake.Build.Make.SSH.temps = ()

Blank version of tuple to store temporary file names scheduled for removal.

Definition at line 4256 of file Make.py.

## ◆ verbose

PyXMake.Build.Make.SSH.verbose

Definition at line 4438 of file Make.py.

## ◆ workspace

PyXMake.Build.Make.SSH.workspace = kwargs.get("workspace",posixpath.join(sftp.getcwd(),"")); sftp.close()

Remote workspace.

This is the scratch directory for the build event. Defaults to /home/user/.

Definition at line 4289 of file Make.py.

## ◆ wrapper_module

PyXMake.Build.Make.SSH.wrapper_module = "pyx_module.f90"

Definition at line 4227 of file Make.py.

## ◆ wrapper_source

PyXMake.Build.Make.SSH.wrapper_source = ""

Definition at line 4226 of file Make.py.

The documentation for this class was generated from the following file:

- src/PyXMake/Build/Make.py