-
-
Notifications
You must be signed in to change notification settings - Fork 26
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
Limit on parallel sim arguments #90
Comments
Not sure how to help here. I just tried your code using Stata 16.1 on Unix and neither Here is my output: . clear all
. version 15
. local exp_arguments = 2000
.
. cap program drop test1
. program define test1, rclass
1. clear
2. set matsize 10000
3. set obs 1000
4. g x = rnormal()
5. forv i=1/10000 {
6. sum x if runiform()<.1, meanonly
7. return scalar r`i' = r(mean)
8. }
9. end
. local list1 ""
. forv i=1/`exp_arguments' {
2. local list1 = "`list1' r`i' = r(r`i')"
3. }
.
. simulate `list1' , reps(10): test1
matsize must be between 10 and 800
an error occurred when simulate executed test1
r(198); System values
-------------
-----------------------------------------------------------------------------------------
c(current_date) = "12 Jun 2021"
c(current_time) = "15:56:37"
c(rmsg_time) = 0 (seconds, from set rmsg)
-----------------------------------------------------------------------------------------
c(stata_version) = 16.1
c(version) = 15 (version)
c(userversion) = 15 (version)
c(dyndoc_version) = 2 (dyndoc)
-----------------------------------------------------------------------------------------
c(born_date) = "01 Sep 2020"
c(flavor) = "IC"
c(bit) = 64
c(SE) = 0
c(MP) = 0
c(processors) = 1 (Stata/MP, set processors)
c(processors_lic) = 1
c(processors_mach) = .
c(processors_max) = 1
c(mode) = ""
c(console) = "console"
-----------------------------------------------------------------------------------------
c(os) = "Unix"
c(osdtl) = ""
c(hostname) = **************
c(machine_type) = "PC (64-bit x86-64)"
c(byteorder) = "lohi"
c(username) = **************
----------------------------------------------------------------------------------------- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The expression list in the "parallel sim" command seems to be limited in the number of arguments it can take.
From what I can tell, the limit changes somewhat between system and version. (tested on both 2-core win 10 stata15 MP2 and 96-core Linux server using stata16.1 MP4)
setting exp_arguments to above 2000 (1938 on this system) will work fine with the standard stata simulate command, but not with "parallel sim". Parallel returns the r(198) error and terminates the parallel processes:
The code below reproduces the error on both systems I have access to. By setting the local exp_arguments lower (example 1000) means both simulate and parallel sim will execute w/o any issues.
System information
Parallel version:
System values:
The text was updated successfully, but these errors were encountered: