Software Archive
Read-only legacy content
17061 Discussions

Threads and Memory

Intel_C_Intel
Employee
224 Views
Hi,

I am working in the parallelization of a sequential program, that uses library CPLEX.

For it, I generate 4 threads, :

do IE = 1, NTHREAD
Entorno(IE) = IE
Escalones(IE) = .TRUE.
pthread(IE) = CreateThread(0, 1000000, Paralelo, IE, 0, LOC(pthreadID(IE)))
end do
ret = WaitForMultipleObjects(NTHREAD, pthread, .TRUE., INFINITE)

Do IE = NTHREAD+1, NESCU
Entorno(IE-NTHREAD) = IE
Escalones(IE) = .TRUE.
pthread(IE-NTHREAD) = CreateThread(0, 1000000, Paralelo, IE,0, LOC(pthreadID(IE-NTHREAD)))
END DO
ret = WaitForMultipleObjects(NTHREAD, pthread, .TRUE., INFINITE)

Definition of same array is:
INTEGER*4 pthread(NTHREAD)
INTEGER*4 pthreadID(NTHREAD)

and:
INTEGER NTHREAD
PARAMETER (NTHREAD=2)

The program break-down after a third of the total processing. I have the impression that it is a memory problem (due to the great number of calls that makes to library) because it is cut when the Task Manager indicates that the used memory (by the program) is approximately 50.000 K.

The machine have 2 processors (Pentium II, 450Mh) with 128 MB of RAM. I use Visual Fortran 6,1. -

The local variables of each procedure are defined like Automatic.

Could they suggest me some mechanism to optimize the memory handling?

Thanks in advance. Ariel.
0 Kudos
0 Replies
Reply