Dynare parallel Error: Attempt to execute SCRIPT mymod as a function:

When I run:

dynare ls.mod parallel conffile=Config.txt parallel_test

I get: Test for Cluster computation, computer localhost … Passed!

But when I want to run:

dynare ls.mod parallel conffile=Config.txt, I am getting this message:

Estimation::mcmc: Write details about the MCMC... Ok!
Estimation::mcmc: Details about the MCMC are available in ls/metropolis\ls_mh_history_0.mat

 
D:\backup\Aldo\DSGE_BVAR\RDP2008-04documentation\RMSEexcerciseforDSGE>psexec -d -W "D:\backup\Aldo\DSGE_BVAR\RDP2008-04documentation\RMSEexcerciseforDSGE" -a 0 -low  matlab -nosplash -nodesktop -minimize  -r "addpath('C:\dynare\4.5.1\matlab\'), dynareroot = dynare_config(); fParallel(1,1,1,1,'posterior_sampler_core')"  
 
PsExec v2.2 - Execute processes remotely 
Copyright (C) 2001-2016 Mark Russinovich 
Sysinternals - www.sysinternals.com 
 
matlab started with process ID 6244. 
 
D:\backup\Aldo\DSGE_BVAR\RDP2008-04documentation\RMSEexcerciseforDSGE>psexec -d -W "D:\backup\Aldo\DSGE_BVAR\RDP2008-04documentation\RMSEexcerciseforDSGE" -a 1 -low  matlab -nosplash -nodesktop -minimize  -r "addpath('C:\dynare\4.5.1\matlab\'), dynareroot = dynare_config(); fParallel(2,2,2,1,'posterior_sampler_core')"  
 
PsExec v2.2 - Execute processes remotely 
Copyright (C) 2001-2016 Mark Russinovich 
Sysinternals - www.sysinternals.com 
 
matlab started with process ID 9828. 
 
D:\backup\Aldo\DSGE_BVAR\RDP2008-04documentation\RMSEexcerciseforDSGE>psexec -d -W "D:\backup\Aldo\DSGE_BVAR\RDP2008-04documentation\RMSEexcerciseforDSGE" -a 2 -low  matlab -nosplash -nodesktop -minimize  -r "addpath('C:\dynare\4.5.1\matlab\'), dynareroot = dynare_config(); fParallel(3,3,3,1,'posterior_sampler_core')"  
 
PsExec v2.2 - Execute processes remotely 
Copyright (C) 2001-2016 Mark Russinovich 
Sysinternals - www.sysinternals.com 
 
matlab started with process ID 6740. 
 
D:\backup\Aldo\DSGE_BVAR\RDP2008-04documentation\RMSEexcerciseforDSGE>psexec -d -W "D:\backup\Aldo\DSGE_BVAR\RDP2008-04documentation\RMSEexcerciseforDSGE" -a 3 -low  matlab -nosplash -nodesktop -minimize  -r "addpath('C:\dynare\4.5.1\matlab\'), dynareroot = dynare_config(); fParallel(4,4,4,1,'posterior_sampler_core')"  
 
PsExec v2.2 - Execute processes remotely 
Copyright (C) 2001-2016 Mark Russinovich 
Sysinternals - www.sysinternals.com 
 
matlab started with process ID 4712. 
Attempt to execute SCRIPT ls as a function:
D:\backup\Aldo\DSGE_BVAR\RDP2008-04documentation\RMSEexcerciseforDSGE\ls.m

Error in dynareParallelDir (line 97)
              ax=ls(filename);

Error in masterParallel (line 736)
    if isempty(dynareParallelDir(['P_',fname,'_*End.txt'],PRCDir,Parallel(1:totSlaves)))

Error in posterior_sampler (line 143)
    [fout, nBlockPerCPU, totCPU] = masterParallel(options_.parallel, fblck,
    nblck,NamFileInput,'posterior_sampler_core', localVars, globalVars, options_.parallel_info);

Error in dynare_estimation_1 (line 447)
            posterior_sampler(objective_function,posterior_sampler_options.proposal_distribution,xparam1,posterior_sampler_options,bounds,dataset_,dataset_info,options_,M_,estim_params_,bayestopt_,oo_);
            
Error in dynare_estimation (line 105)
    dynare_estimation_1(var_list,dname);

Error in ls (line 270)
oo_recursive_=dynare_estimation(var_list_);

Error in dynare (line 223)
evalin('base',fname) ;

Please, how could I fix this?

Do not name your mod-file ls as this is a Matlab command
The error happens in

i.e. where Matlab calls the ls-command

Thanks a lot dear jpfeifer. That solved my problem.

Best wishes

Aldo