Error code documentation


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 ?



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))

        end program

Hope this helps,

Hi Mat,

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