livio wrote:For instance, I use DEFAULT(PRIVATE) in the do loop, if I pass some variable as FIRSTPRIVATE the program quit working, if I use SHARED (for the same variables) the program executes fine. I don't even use the variables that I pass inside the parallel loop, the program crash at the declaration of the subroutine containing the parallel loop.
That does sound like you are hitting some memory limit: for variables declared FIRSTPRIVATE, a new copy will be allocated for each thread on entry to the parallel region, even if the variable is never used. If the variable is SHARED, the original storage is used and no allocation takes place. For read-only variables it is (almost always) better to use SHARED, as it avoid both the memory allocation and the overhead of copying the values.
livio wrote:How do I increase the master thread's stack size in windows?
For the Intel compiler, you can set it at link time with the /F flag.