Personal tools
You are here: Home Forum Install & build Question about MEDMEM_Pointer0f.hxx^

Question about MEDMEM_Pointer0f.hxx^

Up to Install & build

Question about MEDMEM_Pointer0f.hxx^

Posted by Manuel Calleja at August 27. 2010

Hello !

I just wander if someone knows what is this problem related with. To be honest, I have no idea. Clearly is related to pointers, but is this an error??? can this affect my code??? how can I avoid this? Thanks for your help !!!!

 

Here the output:

 

- Trace /home/MEDMEM_PointerOf.hxx [218] : BEGIN PointerOf<T>::set( const T *pointer )

- Trace /home/MEDMEM_PointerOf.hxx [219] : pointer=0xab78f568

- Trace /home/MEDMEM_PointerOf.hxx [220] : _done=0

- Trace /home/MEDMEM_PointerOf.hxx [230] : END PointerOf<T>calleja/salome_5.1.3/MED_5.1.3/include/salome/MEDMEM_PointerOf.hxx [218] : BEGIN PointerOf<T>::set( const T *pointer )

- Trace /home/MEDMEM_PointerOf.hxx [219] : pointer=0xab78f568

- Trace /home/MEDMEM_PointerOf.hxx [220] : _done=0

- Trace /home/MEDMEM_PointerOf.hxx [230] : END PointerOf<T>::set( const T *pointer )

 

Re: Question about MEDMEM_Pointer0f.hxx^

Posted by Edward AGAPOV at August 27. 2010

Hello

 

It is not an error, these are just traces helpful for debug. You can switch them off knowing that these traces are enable

 

# if ( defined(_DEBUG_) || defined(_DEBUG) ) && !defined(_NO_MED_TRACE_)        // MEDMEM_Utilities.hxx:133

 

 

Best regards

Edward

Re: Question about MEDMEM_Pointer0f.hxx^

Posted by Edward AGAPOV at August 27. 2010

If you see those traces when calling some MEDMEM codes from PYTHON, then you need to

setenv NO_MED_TRACE
and re-configure and re-build MED.

If you includes MEDMEM_PointerOf.hxx somehow in your own source codes, then you need to add -D_NO_MED_TRACE_ to your compilation commands.

 

Best regards

Edward

Re: Question about MEDMEM_Pointer0f.hxx^

Posted by Manuel Calleja at September 10. 2010

Hey Edward !!!

 

Thanks for you advice. I was out of town and is only now that I am back and ready to answer. Indeed, now I see that those trace are not an error !!! I switch them off and everything is working. However, now that I am back from holidays, I got a new error :o) Maybe you can give me a hint. I am defining a module inside SALOME, on my file.cxx    The code is the following:

---------------------------------------------------------------------------------------------------------------------------------------------------------------------
const MEDMEM::FIELD<double>*CODE ::getField_SCF()
CODIGO
.
. Definitions of temperature, density and void.
.
CODIGO
 
 FIELD<double>* fieldd=new FIELD<double>(my_support,4);
CODIGO
return fieldd
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------

I create a FIELD (global mesh and support), however, when I run my case, exactly on the "FIELD<double>* fieldd etc...." is crashing. Could you give me a hint about this???

Thanks !!!

Manuel

Re: Question about MEDMEM_Pointer0f.hxx^

Posted by Saint Michael at September 10. 2010

Hi Manuel

Most probably you have problems with memory (invalid reading or writing). In case of a crash, it is easy to find out the reason using a debugger, if it is still unclear with the debugger, try to use valgrind tool to see where an error occurs.

S.Michael

Re: Question about MEDMEM_Pointer0f.hxx^

Posted by Manuel Calleja at September 10. 2010

Hallo Michael !!

 

Indeed, I also agree with you that I have a memory problem. However, sorry about my ignorance but how could I use the valgrind tool????

 

Manuel

Re: Question about MEDMEM_Pointer0f.hxx^

Posted by Saint Michael at September 10. 2010

shell$  valgrind  yourProgram

(Hope you are on *nix system)

S.Michael

Powered by Ploneboard
Document Actions