Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

parallel do issues with Stata comments // #109

Open
4 tasks done
lgraham333 opened this issue May 1, 2024 · 0 comments
Open
4 tasks done

parallel do issues with Stata comments // #109

lgraham333 opened this issue May 1, 2024 · 0 comments

Comments

@lgraham333
Copy link

Preliminaries

Before submitting an issue, please check (with x in brackets) that you:

  • Are using the newest release (see here for latest release version number).
  • Have checked that the examples in the help work.
  • Have read the help (HTML version) and the gallery of examples.
  • Have checked that there is not already an existing issues for what you are reporting.

Expected behavior and actual behavior

Expected behavior run with no errors when using parallel do with a commented do file. Actual behavior // comments throw errors. I thought on lines where I have included comments which begin with // that this would not create any issues. I apologize if I'm not understanding something obvious.

Steps to reproduce the problem

sysuse bplong.dta, clear
parallel initialize 2
parallel do mymodel.do
parallel do mymodel_commented.do

Where mymodel.do is

local maxiter = _N
di "`maxiter'" 
di _newline 
di "`maxiter' again"
forval i = 1/`maxiter' {
   di "`i'"
}

And mymodel_commented.do is

* Test comment 1
local maxiter = _N
di "`maxiter'" 
di _newline 
di "`maxiter' again" // test comment 2
forval i = 1/`maxiter' {
   di "`i'" 
}

The first parallel do command runs and clusters exit with no errors, with expected results.
The second parallel do command clusters exit with error 111, specifically appears to be triggered by the use of // comments. From the log...

.     * Test comment 1
.     local maxiter = _N
.     di "`maxiter'" 
120
.     di _newline 


.     di "`maxiter' again" // test comment 2
120 again_b not allowed when e(b) is not present
r(111);

(Sorry if I've not done this correctly. I've never posted issues really before on GitHub. I also used mata: mata mlib index instead of mata mata mlib index - that seemed to fix one of the earlier issues I had.)

System information

Some relevant information

  • Stata version and flavor (e.g. v14 MP): v17 SE
  • OS type and version (e.g. Windows 10): MacOS 10.15.7
  • Parallel version: 1.20.1 07jun2021

Output from creturn list:

I'm sorry I'm not sure what output I should add here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant