EBSILON®Professional Online Documentation
EbsScript / EbsScript Functions / Process System
In This Topic
    Process System
    In This Topic

     

    Process / System

    Name

    Purpose

    Arguments

    Value returned

    Example

    getCurrentDirectory

    no longer used - use getfilename instead

     

    None

    STRING: current process directory (including path)                            

    var s: string;
    s:=getCurrentDirectory;

    getEnableProcessAffinity

    returns true, if the flag "set process affinity" is activated in general options -  see General Options-> Calculation -> Multi-Threading 

    None

    BOOLEAN:
    true: the flag is activated
    false: the flag is not activated    

    var b:boolean;
    b:=getEnableProcessAffinity ();

     getOMPProcessorCount

     returns the number of processors (for OpenMP) -  see General Options-> Calculation -> Multi-Threading 

     None                             

     INTEGER: the number of processors

     var pc:integer;
     pc := getOMPProcessorCount ();

    getOMPThreadCount

    returns the number of threads (for OpenMP) -  see General Options-> Calculation -> Multi-Threading 

    None                                INTEGER: the number of threads                 

    var tc:integer;
    tc: = getOMPThreadCount();                

    getProcessAfinityMask

    returns the process affinity mask as 32-bit mask for the first 32 cores None

    INTEGER:
    the process affinity mask

    The example shows, if core 5 is active

    var i, pam32:integer;  
    pam32 := getProcessAffinityMask ();
     i := 5;
     c := integer (pow (2,i-1));
     print (((pam32 bitand  $00000010) = c) ? "1" : "0");

    getProcessAfinityMask64

    returns the process affinity mask as 64-bit mask for the cores 1 to 64

    Two Integer:

    1: 32 Bit, each Bit is assigned to one of cores 1 bis 32
    2: 32 Bit, each Bit is assigned to one of cores 3 bis 64

    None var pam32, pam64: integer;   getProcessAffinityMask64 (pam32, pam64);

    getProcessID

    returns the ID of the actual EBSILONPrefessional process None INTEGER:
    the process ID
    println ("GetProcessID  : ", getProcessID ());;

    getSystemAffinityMask

    returns number of cores provided by the system (from the range core 1 to core 32)

    None

    INTEGER:
    the system affinity mask, 
    32 Bit, each Bit is assigned to one of cores 1 bis 32      

    var pam32:integer;  
    pam32 := getSystemAffinityMask ();

    getSystemAffinityMask64

    returns number of cores provided by the system (from the range core 1 to core 64)

    Two Integer:

    1: 32 Bit, each Bit is assigned to one of cores 1 bis 32
    2: 32 Bit, each Bit is assigned to one of cores 3 bis 64

    None 

    var pam32, pam64:integer;   getSystemAffinityMask64 (pam32, pam64);

    isSystem64

    returns true if the current system is a 64-bit system

    1: BOOLEAN: flag for distinguishing between the actual process and the current operating system
    TRUE: means the operating system is analyzed
    FALSE: means the actual (EBSILON) process is analyse

    BOOLEAN:
    true: if the analyzed process or system is 64-bit
    false: otherwise
    println ("IsSystem64 OS : ", isSystem64 (true));
    println ("IsSystem64 EBS: ", isSystem64 (false));

    isUserControl

    returns true, if EBSILON process is controlled by a particular user via GUI (contrary to the process controlled via the COM interface)  None

    BOOLEAN:
    true: if user control via GUI
    false: otherwise

    println ("IsUserControl : ", isUserControl ());

    setCurrentDirectory

    no longer used -  might be used as a string buffer together with getCurrentDirectory 1: STRING: the new active directory including path Boolean: true, if directory could be activated set CurrentDirectory("C:\\Temp");

     setEnableProcessAffinity

     activates / deactivates the flag "set process affinity"

     1: BOOLEAN:
      TRUE: for activating
      FALSE: for deactivating

     None

     setEnableProcessAffinity(TRUE);

    setOMPThreadCount

    set the number of threads (for OpenMP)

    1: INTEGER: number of threads          

     None

     setOMPThreadCount(20);

    setProcessAffinityMask

    Sets processor affinity (affects the first 32 processor cores; calls WinAPI function "SetProcessAffinityMask" for the current process, setting the upper 32 bits of the 64-bit mask to 0 for 64-bit systems (see also MSDN documentation of "SetProcessAffinityMask").

    Integer:
    1: 32 Bit, each Bit is assigned to one of cores 1 bis 32
    In the example cores 1, 2, 4, 7 and 8 are activated

    None

    var pam32:integer; 
    pam32 := 199; // Bits 1 2 3 7 8
    setProcessAffinityMask (pam32);

    // 199 = 1 + 2 + 4 + 64 + 128

    setProcessAffinityMask64

     

    Sets processor affinity (up to 64 cores; calls WinAPI function "SetProcessAffinityMask" for the current process. For 32-bit systems identical to the EbsScript function setProcessAffinityMask. See also MSDN documentation of "SetProcessAffinityMask").

    Two Integer:

    1: 32 Bit, each Bit is assigned to one of cores 1 bis 32
    2: 32 Bit, each Bit is assigned to one of cores 3 bis 64

    None var pam32, pam64:integer;  
    setProcessAffinityMask64 (pam32, pam64);

    setUserControl

    Sets the user control (see isUserControl). If no, no message boxes are output, for example.

    1: BOOLEAN
    TRUE: for activating
    FALSE: for deactivating

    None

    setUserControl (TRUE);