compile Abinit as a library?

option, parallelism,...

Moderators: fgoudreault, mcote

Forum rules
Please have a look at ~abinit/doc/config/build-config.ac in the source package for detailed and up-to-date information about the configuration of Abinit 8 builds.
For a video explanation on how to build Abinit 7.x for Linux, please go to: http://www.youtube.com/watch?v=DppLQ-KQA68.
IMPORTANT: when an answer solves your problem, please check the little green V-like button on its upper-right corner to accept it.
Locked
davydden
Posts: 17
Joined: Fri Feb 15, 2013 6:50 pm

compile Abinit as a library?

Post by davydden » Thu Mar 28, 2013 10:48 am

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.

User avatar
jzwanzig
Posts: 504
Joined: Mon Aug 17, 2009 9:25 am

Re: compile Abinit as a library?

Post by jzwanzig » Sat Mar 30, 2013 11:32 am

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?
Josef W. Zwanziger
Professor, Department of Chemistry
Canada Research Chair in NMR Studies of Materials
Dalhousie University
Halifax, NS B3H 4J3 Canada
jzwanzig@gmail.com

Locked