What you are missing is that there are _two_ messaging layers in the system. You told the btl/tcp layer to use the specified ports, but left the oob/tcp one unspecified. You need to add
oob_tcp_dynamic_ipv4_ports = 46207-46239 or whatever range you want to specify Note that if you want the btl/tcp layer to use those other settings (e.g., keepalive_time), then you'll need to set those as well. The names of the variables may not match between the layers - you'll need to use ompi_info to find the names and params available for each layer. > On Mar 16, 2021, at 2:43 AM, Vincent via users <users@lists.open-mpi.org> > wrote: > > On 09/03/2021 11:23, Sendu Bala via users wrote: >> When using mpirun, how do you pick which ports are used? >> >> I???ve tried: >> >> mpirun --mca btl_tcp_port_min_v4 46207 --mca btl_tcp_port_range_v4 32 --mca >> oob_tcp_keepalive_time 45 --mca oob_tcp_max_recon_attempts 20 --mca >> oob_tcp_retry_delay 1 --mca oob_tcp_keepalive_probes 20 --mca >> oob_tcp_keepalive_intvl 10 true >> >> And also setting similar things in openmpi/etc/openmpi-mca-params.conf : >> btl_tcp_port_min_v4 = 46207 >> btl_tcp_port_range_v4 = 32 >> oob_tcp_keepalive_time = 45 >> oob_tcp_max_recon_attempts = 20 >> oob_tcp_retry_delay = 1 >> oob_tcp_keepalive_probes = 20 >> oob_tcp_keepalive_intvl = 10 >> >> But when the process is running: >> >> ss -l -p -n | grep "pid=57642," >> tcp LISTEN 0 128 >> 127.0.0.1:58439 0.0.0.0:* >> users:(("mpirun",pid=57642,fd=14)) >> tcp LISTEN 0 128 >> 0.0.0.0:36253 0.0.0.0:* >> users:(("mpirun",pid=57642,fd=17)) >> >> What am I doing wrong, and how do I get it to use my desired ports (and >> other settings above)? >> >> > Hello > > Could this be related to some recently resolved bug ? > What version are you running ? > Having a look on https://github.com/open-mpi/ompi/issues/8304 could be > possibly useful? > > Regards > > Vincent. >