Add process ID to the STATUS file.

Documentation, Web site and code modifications

Moderators: baguetl, routerov

Locked
spamrefuse
Posts: 35
Joined: Wed Jan 20, 2010 3:08 am

Add process ID to the STATUS file.

Post by spamrefuse » Mon Jul 19, 2010 1:36 am

Hi,

On my system often there are several instances running of abinit.
Occasionally I have to kill one of those abinits running.

It is then difficult to find out which process id (PID) I should kill.
If the STATUS file would also show the PID of the running abinit,
that would make life much easier.

Is it possible to add the PID in the STATUS file?

Regards,
Rob.

User avatar
pouillon
Posts: 651
Joined: Wed Aug 19, 2009 10:08 am
Location: Spain
Contact:

Re: Add process ID to the STATUS file.

Post by pouillon » Fri Jul 23, 2010 3:43 pm

Accessing the PID would require writing some code in C and consequently add dependencies of Abinit to some C libraries, which would somewhat decrease the portability and further increase the complexity of the build process.

For these reasons, I would not do it, even if the idea itself seems nice to me.
Yann Pouillon
Simune Atomistics
Donostia-San Sebastián, Spain

pmanglade
Posts: 20
Joined: Mon Aug 17, 2009 9:49 am

Re: Add process ID to the STATUS file.

Post by pmanglade » Mon Jul 26, 2010 8:22 am

Hi Yann,

I've almost never had a look to the build system but would it be difficult to test if a simple fortran program calling "getpid()" compile and then to choose whether the available getpid() shall be compiled or a dummy function returning 0 ?

regards

PMA

User avatar
pouillon
Posts: 651
Joined: Wed Aug 19, 2009 10:08 am
Location: Spain
Contact:

Re: Add process ID to the STATUS file.

Post by pouillon » Wed Aug 04, 2010 6:50 pm

That's an idea. I could declare a CPP option called HAVE_FC_GETPID in the build system with the result of the test, and it would be simple to do.

However, someone else has to take care of the rest, since I have other priorities and emergencies.
Yann Pouillon
Simune Atomistics
Donostia-San Sebastián, Spain

User avatar
pouillon
Posts: 651
Joined: Wed Aug 19, 2009 10:08 am
Location: Spain
Contact:

Re: Add process ID to the STATUS file.

Post by pouillon » Wed Aug 04, 2010 7:16 pm

Done in my 6.2.2 branch. I now pass the torch to any volunteer.
Yann Pouillon
Simune Atomistics
Donostia-San Sebastián, Spain

pmanglade
Posts: 20
Joined: Mon Aug 17, 2009 9:49 am

Re: Add process ID to the STATUS file.

Post by pmanglade » Sun Aug 08, 2010 1:50 pm

In case no one could do it before september, I'll try to do it at that time.

User avatar
pouillon
Posts: 651
Joined: Wed Aug 19, 2009 10:08 am
Location: Spain
Contact:

Re: Add process ID to the STATUS file.

Post by pouillon » Fri Sep 03, 2010 6:16 pm

The stage is yours ... ;)
Yann Pouillon
Simune Atomistics
Donostia-San Sebastián, Spain

Locked