"make multi nproc=8" still only seems to run on 1 processor  [SOLVED]

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
Fm3m
Posts: 7
Joined: Thu Mar 20, 2014 1:26 am

"make multi nproc=8" still only seems to run on 1 processor

Post by Fm3m » Mon Apr 28, 2014 6:44 pm

Hello,

I'm compiling abinit 7.6.2 to run on a cluster. We have 8 processors per node, so I used
>make multi_nprocs=8
when I was compiling. Compilation ran without errors.

When I run abinit, I do not use mpi to handle the job. Rather, I log in to a compute node (which has 8 processors) and run abinit directly. However, if I do this and then separately run
>top
there is only one process running. Furthermore, when I run abinit and check the log, abinit has output
nproc = 1

Any suggestions?

Thanks in advance.

User avatar
jbeuken
Posts: 365
Joined: Tue Aug 18, 2009 9:24 pm
Contact:

Re: "make multi nproc=8" still only seems to run on 1 proces

Post by jbeuken » Mon Apr 28, 2014 7:31 pm

Hi,

make multi multi_nprocs=x ( not make multi_nprocs=x )

jmb
------
Jean-Michel Beuken
Computer Scientist

Fm3m
Posts: 7
Joined: Thu Mar 20, 2014 1:26 am

Re: "make multi nproc=8" still only seems to run on 1 proces

Post by Fm3m » Mon Apr 28, 2014 9:35 pm

Thank you for the suggestion. However, the problem persists.

>./configure --prefix=/home/fs03/ehs73/bin/abinit-7.6.2
> make clean
> make multi multi_nprocs=8
> make install

Followed by
abinit <input.files>& log

still only runs on one processor.

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

Re: "make multi nproc=8" still only seems to run on 1 proces

Post by jzwanzig » Tue Apr 29, 2014 12:40 pm

make multi multi_nprocs=8 means that it will use 8 processors to build abinit (which is faster than using 1 processor to build abinit).

When you RUN abinit, you have to tell it how many processors to use, typically (if you are using MPI as your parallel environment) through
mpirun -np 8 abinit < foo.files &> log

mpirun launches abinit using in this case 8 processors. Note the following: the value you use for np need not correspond to the number of physical cores on your machine, although it will get quite inefficient if you use a number much larger than the number of physical processors. Secondly, mpirun (or mpiexec etc) are not part of abinit, they are part of the MPI environment which has to have been installed separately (and usually is in multi-core linux-type systems).
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

Fm3m
Posts: 7
Joined: Thu Mar 20, 2014 1:26 am

Re: "make multi nproc=8" still only seems to run on 1 proces

Post by Fm3m » Wed Apr 30, 2014 5:33 pm

I am not using mpirun, just evoking abinit from the command line (see earlier post in this thread).

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

Re: "make multi nproc=8" still only seems to run on 1 proces  [SOLVED]

Post by jzwanzig » Wed Apr 30, 2014 8:24 pm

Yes, I saw that you are not using mpirun, and that's exactly why abinit is only running on one processor. Like any other parallelized program, abinit to run in parallel must be explicitly launched in the parallel environment with the desired number of processors. mpirun is the program that takes care of this. make multi_nproc has nothing to do with this aspect. You could use make multi_nproc to build a purely serial version of abinit if you wanted to. It sounds like you are building a parallel version (are you? is it being compiled by mpif90, as opposed to gfortran or ifort?) Then to executed on multiple processors you have to start abinit using mpirun, not by running all by itself.
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

Fm3m
Posts: 7
Joined: Thu Mar 20, 2014 1:26 am

Re: "make multi nproc=8" still only seems to run on 1 proces

Post by Fm3m » Thu May 01, 2014 5:10 pm

OK, thanks. I see now.

Locked