mpirun -n 4 myprog is only giving me 1 thread when I would like 4.  How do I 
specify 4 threads? mpiexec.hydra -n 4 correctly gives me 4 threads. I have 
tried to configure a hostfile with no luck.  I am running Ubuntu 18.04.  Here 
is a listing of hello.f90:

        use mpi
        implicit none
        integer, parameter :: i4= selected_real_kind(4)
        integer (i4) :: mype
        integer (i4) :: nprocs
        integer (i4) :: ierr
        call mpi_init(ierr)
        call mpi_comm_size(mpi_comm_world,nprocs,ierr)
        call mpi_comm_rank(mpi_comm_world,mype,ierr)
        write(6,*) 'Hello World',mype
        call mpi_finalize(ierr)
        stop
        end

Here is a mpirun example:

        mpirun -n 4 a.out
        Hello World           0
        Hello World           0
        Hello World           0
        Hello World           0

Here is a mpiexec.hydra example:

        mpiexec.hydra -n 4 a.out
        Hello World           3
        Hello World           1
        Hello World           2
        Hello World           0

Here is the output of lscpu:

        Architecture:        x86_64
        CPU op-mode(s):      32-bit, 64-bit
        Byte Order:          Little Endian
        CPU(s):              256
        On-line CPU(s) list: 0-255
        Thread(s) per core:  2
        Core(s) per socket:  64
        Socket(s):           2
        NUMA node(s):        2
        Vendor ID:           AuthenticAMD
        CPU family:          23
        Model:               49
        Model name:          AMD EPYC 7742 64-Core Processor
        Stepping:            0
        CPU MHz:             1499.900
        CPU max MHz:         2250.0000
        CPU min MHz:         1500.0000
        BogoMIPS:            4499.95
        Virtualization:      AMD-V
        L1d cache:           32K
        L1i cache:           32K
        L2 cache:            512K
        L3 cache:            16384K
        NUMA node0 CPU(s):   0-63,128-191
        NUMA node1 CPU(s):   64-127,192-255




Reply via email to