Error code documentation

Hello,

0: ALLOCATE: 192 bytes requested; status = 38

I try to look at the error.h in the pgi repertory but i could not find nothing as well as in the standart documentation.

Do you know where I can find documentation about error codes ?

Cheers,

Matt

Hi Matt,

The status returned by allocate is system dependent. Hence, to check what status “38” means you need to add a check in your program using a call to ‘perror’.

For example:

        program testerr
        real, allocatable, dimension(:) :: arr
        integer :: astat
        character(255) :: err_msg

        allocate(arr(1000), stat=astat)
        if (astat > 0) then
           err_msg = 'Allocate failed with message '
           call perror(trim(err_msg))
        endif

        end program

Hope this helps,
Mat

Hi Mat,

Thanks for your answer, it is a good point to be aware of.

Matt