Error 487

Hi

I have brought the PGI complier moving away from the Intel complier, but so far I am regretting doing so as the PGI complier is far fussy than the Intel complier I was using. I can’t get my Fortran program to run. Even after changing many tiny issues (which the Intel complier would just breeze past) I can get I get the program to compile, but then I get this error.

pr_set_mem:failed to write 4 bytes at address 0000000000067D7A0 (error 487)

I have search on Google, this site and the user manuals so far I have found nothing related to this “pr_set_mem error 487”

The code I am running is very long so I doubt I can post it here. If there are any other details I can provide to help locate the problem please tell me.

By playing around with a sample file I found the source of the error. It comes from use of “module”, Can some one please explain why this is happening?

Module Main

	  !     Declarations for main program
      REAL A,B,C
      REAL AV, AVSQ1, AVSQ2
      REAL Pythagoras1
      
!     Enter the data
      DATA A,B,C/5.0,2.0,3.0/
	                                      
End Module Main  

   PROGRAM FUNDEM

	 use MAIN
!     Calculate the average of the numbers
      AV = AVRAGE(A,B,C)
      AVSQ1 = AVRAGE(A,B,C) **2
   	  AVSQ2 = AVRAGE(A**2,B**2,C**2)
   	  Pythagoras1 = Pythagoras(a,b,c)

	  PRINT *,'Statistical Analysis'
      PRINT *,'The average of the numbers is:',AV
      PRINT *,'The average squared of the numbers: ',AVSQl
      PRINT *,'The average of the squares is: ', AVSQ2
      PRINT *,'The average of the squares is: ', AVSQ2
      PRINT *,'Pythagoras1', Pythagoras1
      pause
      END

     REAL FUNCTION AVRAGE(X,Y,Z)
     REAL X,Y,Z,SUM
     SUM = X + Y + Z
     AVRAGE = SUM /3.0
     RETURN
     END
     
    REAL Function Pythagoras(x,y,z)

	real ::  x,y,z

	Pythagoras = sqrt(x*x + y*y + z*z) 

	END Function

Hi Beverley,

I’m sorry your having problems. I have never seen this particular error before, and like you, can’t find any information as to what “pr_set_mem” is. It’s not a PGI routine and I suspect it’s coming from the Linux kernel. Also, for good or bad, your example works fine for me.

Can you please let us know what version of the compiler you’re using, what OS version, your processor, and your command line flags?

Thanks,
Mat

i’ve come to the same problem.

i’m using windows server 2008 R2 64.

the code was wrote under VS2012 and works well in VS2012.

what is it?

is it possible that it’s an error from jre?

Hi sizheng,

Thanks for opening up this old thread since Beverley didn’t respond to my post and I was never able recreate the issue.

Can you walk me through the steps you are doing to that get this error?
The only tools that use JRE are the debugger and profiler. Are you using either of these? Which compiler version are you using?
Are you using PVF or the command line Workstation?
You say that it compiles under VS2012. Do this mean you are compiling a C/C++ code?

Best Regards,
Mat

about this problem, here is the email i wrote to the support:

Dear Sir,

i’m encountering 2 problem when debugging as the attached picture shows.

  1. pr_set_mem: failed to write 4 bytes at address 00401830 (error 487)
    i don’t know what’s that, but it seems that the debugger will work.

my program was written in VS2012 by C++, and works well. it can accept some args such as the path of an input file, which will be saved in string strFileName="";
however, if i set the file path in the GUI of the debugger, it seems that the program cann’t receive it, the program will not load data from the file correctly.
the attached picture shows that case.

but if i directly set the file path in the code, such as “string strFileName=“G:\20090814-20120106\20090910\UserRelationBy_2009-09-10_directed_arcs.tmp”;”, the program will load the data from the file directly.
i wonder why?

it’s a pity that i can’t post the screenshot here

Hi sizheng,

I talked with our Tools Managers who said that “pr_set_mem” messages are spurious and do not effect the correct operation of the debugger.

For the file path issue, it may be a problem with the debugger where it’s not handing unicode characters correctly. Does the same problem occur if the file path does not contain unicode characters?

Best Regards,
Mat