Skip to content
Snippets Groups Projects
Select Git revision
  • 4c7960fbdc702134c4e853d2dd17733552ca0b9f
  • master default protected
  • 5.x
  • asm
  • time-varying-information-set
  • 4.6
  • dynare_minreal
  • dragonfly
  • various_fixes
  • 4.5
  • clang+openmp
  • dynamic-striated
  • occbin
  • exo_steady_state
  • filter_initial_state
  • declare_vars_in_model_block
  • exceptions
  • rmExtraExo
  • julia
  • error_msg_undeclared_model_vars
  • static_aux_vars
  • 5.3
  • 5.2
  • 5.1
  • 5.0
  • 5.0-rc1
  • 4.7-beta3
  • 4.7-beta2
  • 4.7-beta1
  • 4.6.4
  • 4.6.3
  • 4.6.2
  • 4.6.1
  • 4.6.0
  • 4.6.0-rc2
  • 4.6.0-rc1
  • 4.6-beta1
  • 4.5.7
  • 4.5.6
  • 4.5.5
  • 4.5.4
41 results

AnalyseComputationalEnvironment.m

Blame
  • Forked from Dynare / dynare
    Source project has a limited visibility.
    AnalyseComputationalEnvironment.m 24.13 KiB
    function [ErrorCode] = AnalyseComputationalEnvironment(DataInput, DataInputAdd)
    % PARALLEL CONTEXT
    % In a parallel context, this function is used to check the cluster defined by the user.
    % If no error happen the function returns 0. The function complies with
    % Windows/Linux operating systems and Matlab/Octave software.
    %
    %
    % INPUT/OUTPUT description:
    %
    %
    % DataInput
    %   is the strcture option_.parallel, with the follow fields:
    %
    %             Local         1 is on local machine, 0 remote
    %      ComputerName         the computer name.
    %            CPUnbr         the CPU's
    %          UserName         the user name for the ComputerName.
    %          Password         the password for the user name in ComputerName.
    %       RemoteDrive         Drive used for Remote computation (data exchange, etc): must be contain 'RemoteFolder'.
    %   RemoteDirectory         Folder in RemoteDrive used for Remote computation.
    %  MatlabOctavePath         Path to MATLAB or Octave executable.
    %        DynarePath         Path to matlab directory within the Dynare installation directory.
    %
    %   This information is typed by the user in the DYNARE configuration file and is parsed by the preprocessor,
    %   the goal of this function is to check if configuration is correct and if dynare
    %   can be executed successfully in parallel mode.
    %
    %
    % DataInputAdd
    %   it is the structure options_.parallel_info. Currently , only the string in the
    %   field RemoteTmpFolder (the temporary directory created/destroyed on remote
    %   computer) is used.
    
    if ispc
        [tempo, MasterName]=system('hostname');
        MasterName=deblank(MasterName);
    end
    
    RemoteTmpFolder=DataInputAdd.RemoteTmpFolder;
    dynareParallelMkDir(RemoteTmpFolder,DataInput);
    
    
    % The variable ErrorCode is initialized at 0. If there are non problems with
    % Local, ComputerName connections,... in general with parallel software execution,
    % the ErrorCode is unchanged, in the others cases 1, 2 , ... The values
    % table is below.
    %
    %
    %   Table for ErrorCode Values.
    %
    %   ErrorCode -> 0      Initial Value -> No Error Detected!!!
    %   ErrorCode -> 1 ...  When an error is detected, the values 1, 2, 3... are
    %   used to specify the type of error or warning.
    %
    %   Value 1:    The variable 'Local' has a bad value!
    %
    %   Value 2:    The variable 'CPUnbr' has a bad value. For more information
    %               see http://www.dynare.org/DynareWiki/ParallelDynare.
    %         2.1   [warning] The user asks to use more CPU's than those available.
    %         2.2   [warning] There are unused CPU's!
    %         2.3   [error] NumberOfThreadsPerJob is not a divisor of CPUnbr
    %
    %
    %   Value 3:    The remote computer is unreachable!!!
    %
    %   Value 4:    The fields user name and/or password are/is empty!
    %
    %   Value 5:    Remote Drive and/or Remote Folder do not exist!
    %
    %   Value 6:    It is impossible write/read files on the remote computer.