Help using Base SAS procedures

Proc FCMP: Program ends with no error or result

Accepted Solution Solved
Reply
Frequent Contributor
Posts: 99
Accepted Solution

Proc FCMP: Program ends with no error or result

Hi all,

            I was able to run form a 5000 nodes matrix in around 2 hours. But when i run for a 8000 nodes matrix it just ends in a second with no error. Is it memory issue or something else.

           Appreciate you help.

Amit

Code:

proc fcmp;

array A[8000,8000] / nosymbols;

array Ident[8000,8000] / nosymbols;

array Z[8000,8000] / nosymbols;

  array P[8000,8000] / nosymbols;

    do i = 1 to 8000;

      do j = 1 to 8000;

         A[i, j] = RANUNI(12345);

  if A[i, j] le .4 then A[i, j] = 0;

  else A[i, j] = 1;

         A[i, j] =  0.5*A[i, j];

  Ident[i,j] = A[i,j];

  

   end;

     end;

call IDENTITY (Ident);

CALL SUBTRACTMATRIX (Ident, A, Z);

CALL INV (Z, P);

rc = write_array('result', p);

run;

log:

NOTE: PROCEDURE FCMP used (Total process time):

      real time           0.24 seconds

      cpu time            0.01 seconds


Accepted Solutions
Solution
‎10-19-2012 01:49 AM
Valued Guide
Posts: 634

Re: Proc FCMP: Program ends with no error or result

The matrix being inverted seems a bit large, and memory may indeed be an issue.  Have you tried increasing the memory buffers?

Although it won't help with the memory, we can speed up the processing a bit by replacing your A[I,J] IF-THEN/ELSE assignment statements.

  r=ranuni(12345);

  a[i,j] = 0*(r<=.4)+.5*(r>.4);

View solution in original post


All Replies
Solution
‎10-19-2012 01:49 AM
Valued Guide
Posts: 634

Re: Proc FCMP: Program ends with no error or result

The matrix being inverted seems a bit large, and memory may indeed be an issue.  Have you tried increasing the memory buffers?

Although it won't help with the memory, we can speed up the processing a bit by replacing your A[I,J] IF-THEN/ELSE assignment statements.

  r=ranuni(12345);

  a[i,j] = 0*(r<=.4)+.5*(r>.4);

Frequent Contributor
Posts: 99

Re: Proc FCMP: Program ends with no error or result

Hi Art,

             Appreciate your help. I have previously taken you class on Macro programming. It was really helpful. Thank you for being a great teacher.

              It is memory issue. How can i increase the memory buffer as you mentioned? How does one find how much the memory buffer is?

            Also I have updated my code to remove the if then else.

Regards,

Amit

Valued Guide
Posts: 634

Re: Proc FCMP: Program ends with no error or result

An earlier thread on memory usage and matricies can be found at: https://communities.sas.com/message/140513#140513

The system option for memory allocation is MEMSIZE.  You may also get more detailed responses in the SAS/IML forum, which specializes in issues with matrix manipulation.

🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 3 replies
  • 200 views
  • 0 likes
  • 2 in conversation