[Pw_forum] fix ions during relaxation / compile as a library?

Denis Davydov davydden at gmail.com
Fri Apr 5 13:09:29 CEST 2013


Dear Prof. Giannozzi, Dr. Paulatto

thanks for your replies. 

On 05.04.2013, at 12:00, pw_forum-request at pwscf.org wrote:

> 
>> 2) is it possible to compile QE as a library (preferably C++) and
>> then provide an MPI communicator to be used, something like:
>> 
>>    MPI_Comm_split(MPI_COMM_WORLD,my_color,0,&comm_qe);
>>    qe   = new QE_NS::QE(0,NULL,comm_qe);
>>    qe.run("my_input.txt");
> No... not yet at least. It's not that easy to do. I know that some work 
> in this direction has been done, and IS being done right now. i.e. PW 
> can be used as a plugin for PLUMED (or PLUMED as a plugin for PW, 
> depending on the website you're on); so maybe you can study and reuse 
> this interface mechanism.

i will have a look. 

>> 2) is it possible to compile QE as a library (preferably C++) and 
>> then provide an MPI communicator to be used, something like:
>> 
>>   MPI_Comm_split(MPI_COMM_WORLD,my_color,0,&comm_qe);
>>   qe   = new QE_NS::QE(0,NULL,comm_qe);
>>   qe.run("my_input.txt");
> 
> the above syntax is completely obscure to me, but it is definitely
> possible to call QE from a C++ code: it has been done in the past.
> QE is actually already a library, with a few small main codes that 
> call all the rest, but it is not yet in a very usable form as a 
> library. 

my intention is to understand if it can be (from MPI point of view) 
sequentially combined with another parallel code (e.g. Lammps MD code). 
That is why I mentioned those C++ lines of MPI usage which 
take part of the given current communicator and (hypothetically) 
use them to create an instance of QE object. 

I know that QE is written in Fortran, but i read somewhere that 
at the very top level (say the main file) it's wrapped in C/C++, 
however, i can't find a confirmation to this in the sources. 


Kind regards,
Denis 






More information about the users mailing list