Page 1 of 1

compile Abinit as a library?

Posted: Thu Mar 28, 2013 10:48 am
by davydden
Dear all,

I wonder if there is a way to compile Abinit as a library and use it within (C++,C) main's MPI declarations in a parallel run,
schematically like

Code: Select all

MPI_Init(&narg,&arg);
int me,nprocs;
MPI_Comm_rank(MPI_COMM_WORLD,&me);
MPI_Comm_size(MPI_COMM_WORLD,&nprocs);

Abinit_NS::Abinit *abinit;
abinit = new Abinit_NS::Abinit(0,NULL,MPI_COMM_WORLD);
abinit.run("file.in");

MPI_Finalize();


Thanks in advance,
Regards,
Denis.

Re: compile Abinit as a library?

Posted: Sat Mar 30, 2013 11:32 am
by jzwanzig
I don't know for sure but I don't think it's possible at this time--but I'm curious, what would be the advantage of doing it? I mean, as compared for example to having a script submit multiple instances of abinit runs to a job scheduler?