On Jun 26, 2007, at 6:48 PM, Aleksandar Donev wrote:
> On Tuesday 26 June 2007 15:05, Andrew Chan wrote:
>> Some operating systems overwrite the same file location for the
>> same file
>> name and some others write to a different location and then rename
>> the
>> file.
> Sorry I forgot to say this important information: I am using the Intel
> compiler on Linux x86_64
Since this is Linux, try "ls -i" on the executable before and after
recompilation. This prints out the inode. If it doesn't change, then
you have overwritten the old executable. If it changes, then the old
executable has been replaced by a new one, and the old one still
exists and is being used by your running process, though it's no
longer associated with the file system.
However, there can be additional subtleties involving dynamic shared
libraries; if recompilation creates new versions, then they could
possibly be overwritten in place, even if the executable is a new one.
If you only see the problem when you are recompiling, then it's a
pretty good guess that recompilation is the cure.
Most people run the executable from a different location than the one
where they compiled it (using an installation step), in part so as
not to have to worry about this sort of thing.
-P.
|