Quantcast
Channel: Intel® Software - Intel® C++ Compiler
Viewing all articles
Browse latest Browse all 1175

Problem running code using MPI: ncpu is always 1 (Centos 7)

$
0
0

I'm running Parallel Studio XE 2019 Update 3, and I've got the problem where, when I run a program compiled using MPI, the number of CPUs is always set to 1.  It runs, but only on 1 CPU.  (It also starts separate instances of the same code on the other CPUs, but the others crash because they don't get the input file.)  This is a mixed Fortran, C++ code, but the MPI part is called from the C++ portion, so I think this is the correct forum.  The code is run on the same computer I compiled it, with the command

mpirun -n 4 mycode < sphere.inp > sphere.out

This is a large code that has worked correctly on a different linux (maybe unix) system, when compiled using Intel Composer XE 2013.  That had some additional flags that I don't think are relevant, but I give the command below:

mpirun --bind-to-core --cpus-per-proc 1 -np 8 mycode -lmpi -lmpi < sphere.inp > sphere.out

Adding -lmpi once when I run it on the new system doesn't change the behavior.  If I add it twice, the code doesn't run at all.  The --bind-to-core --cpus-per-proc flags aren't recognized on the new system.

Running which -a mpirun gives four identical lines (I guess because of the duplicated lines in my path, see below), but no other version of mpirun.

/opt/intel/compilers_and_libraries_2019.3.199/linux/mpi/intel64/bin/mpirun
/opt/intel/compilers_and_libraries_2019.3.199/linux/mpi/intel64/bin/mpirun
/opt/intel/compilers_and_libraries_2019.3.199/linux/mpi/intel64/bin/mpirun
/opt/intel/compilers_and_libraries_2019.3.199/linux/mpi/intel64/bin/mpirun

 

I've searched, and the answers given online always seem to be that there's another version of mpirun, but I'm not sure how that is.  This is on a brand new install of Centos 7 (build 1810, so I think that's 7.6), made just so I can install Parallel Studio XE and compile this code.  I don't think there's another MPI version that comes with Centos by default.  And the which command doesn't show any other version.

Anyone got any ideas that I can try?

My .bashrc is given below, followed by my PATH.

# .bashrc

# Source global definitions
if [ -f /etc/bashrc ]; then
    . /etc/bashrc
fi

# User specific environment and startup programs
#
#  Add my personal bin directory.
#
PATH=$PATH:$HOME/bin

export PATH

source /opt/intel/compilers_and_libraries_2019.3.199/linux/mpi/intel64/bin/mpivars.sh
source /opt/intel/compilers_and_libraries_2019/linux/bin/compilervars.sh intel64

Here's my path, with line returns added for clarity. (Yes, some directories are listed two to four times.  I don't know why that is, but I don't think that will matter.)

/opt/intel/compilers_and_libraries_2019.3.199/linux/bin/intel64:
/opt/intel/compilers_and_libraries_2019.3.199/linux/mpi/intel64/libfabric/bin:
/opt/intel/compilers_and_libraries_2019.3.199/linux/mpi/intel64/bin:
/opt/intel/compilers_and_libraries_2019.3.199/linux/mpi/intel64/libfabric/bin:
/opt/intel/compilers_and_libraries_2019.3.199/linux/mpi/intel64/bin:
/opt/intel/compilers_and_libraries_2019.3.199/linux/bin/intel64:
/opt/intel/compilers_and_libraries_2019.3.199/linux/mpi/intel64/libfabric/bin:
/opt/intel/compilers_and_libraries_2019.3.199/linux/mpi/intel64/bin:
/opt/intel/debugger_2019/gdb/intel64/bin:
/opt/intel/compilers_and_libraries_2019.3.199/linux/mpi/intel64/libfabric/bin:
/opt/intel/compilers_and_libraries_2019.3.199/linux/mpi/intel64/bin:
/usr/lib64/qt-3.3/bin:
/usr/local/bin:
/usr/local/sbin:
/usr/bin:
/usr/sbin:
/bin:
/sbin:
/home/zenbeam/bin:
/home/zenbeam/bin


Viewing all articles
Browse latest Browse all 1175

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>