SimulationEverywhere / CDPP_ExtendedStates-codename-Santi

An extended and improved version of CD++ for Cell-DEVS
MIT License
4 stars 6 forks source link

Coupled model is not generating more than 100 log files #12

Closed scherman closed 4 years ago

scherman commented 4 years ago

When running the following coupled model:

[top]
components : persona gen@generator
% link : out@gen in@persona

[gen]
distribution : exponential
mean : 3
initial : 1
increment : 0 
out : out

[persona]
type : cell
border : nowrapped
delay : transport
defaultDelayTime : 100
dim : (20, 20)
initialvalue : 0
in : in
link : in in@persona(1,0)
neighbors :                              persona(-2,0) 
neighbors :               persona(-1,-1) persona(-1,0) persona(-1,1) persona(-1,2)
neighbors : persona(0,-2) persona(0,-1) persona(0,0) persona(0,1) persona(0,2)
neighbors :               persona(1,-1) persona(1,0) persona(1,1) persona(1,2)
neighbors :                              persona(2,0) 
localtransition: persona-rule
initialrowvalue : 3 10101

[persona-rule]
rule : 0 400 {(0,0)=1 and (0,1) = 0 and(0,2) != 2}
rule : 1 400 {(0,0)=0 and (0,1) != 2 and (0,-1) = 1}
rule : 0 400 {(0,0)=1 and (0,1)!=0 and(1,0)=0 and (1,1)!=2 and (1,-1)!=1}
rule : 1 400 {(0,0)=0 and (-1,0)=1 and (-1,1)!=0 and (0,1)!=2 and (0,-1)!=1}
rule : 0 400 {(0,0)=1 and ((0,1)=2 or(0,1)=3) and (1,0)!=0 and (-1,0)=0 and (-1,1)!=2 and (-1,-1)!=1}
rule : 1 400 {(0,0)=0 and (1,0)=1 and((1,1)=2 or (1,1)=3) and (2,0)!=0 and(0,1)!=2 and (0,-1)!=1}
rule : 0 400 {(0,0)=1 and (0,1)=0 and(0,2)=2 and (1,0)=0 and (1,1)!=2 and (1,-1)!=1}
rule : 1 400 {(0,0)=0 and (-1,0)=1 and (-1,2)=2 and (-1,1)=0 and (0,1)!=2 and (0,-1)!=1}
rule : 0 400 {(0,0)=1 and (0,1)=0 and(0,2)=2 and (1,0)!=0 and (-1,0)=0 and (-1,1)!=2 and (-1,-1)!=1}
rule : 1 400 {(0,0)=0 and (1,0)=1 and(1,2)=2 and (1,1)=0 and (2,0)!=0and (0,-1)!=1 and (0,1)!=2}
rule : {(0,0)} 100 {t} 

Then I would expect to generate ~400 log files (at least, one for each cell). Yet, it seems that it's stopping at ~100. Note that changing the dimensions to dim : (5, 5) works fine.

romancardenas commented 4 years ago

Same here, I only get the log files of the first 100 cells of the scenario. Though the simulation appears to work properly.

lukius commented 4 years ago

This was addressed in 0063ba6e0ecb6753c0d096ca8c9c2568c97a36c0. Nevertheless, Linux usually limits the number of open files per process to 1024. This limit might be increased e.g. by executing ulimit -n (but still there is a hard limit of 4096 file descriptors).

lukius commented 4 years ago

FYI, this issue is also present in older versions of the simulator (it was not introduced in this fork).