Create README.md
Signed-off-by: David Rotermund <54365609+davrot@users.noreply.github.com>
This commit is contained in:
parent
636d5ec539
commit
244e36a049
1 changed files with 29 additions and 0 deletions
29
admin/pytorch/check_for_open_port/README.md
Normal file
29
admin/pytorch/check_for_open_port/README.md
Normal file
|
@ -0,0 +1,29 @@
|
|||
# Check the port for torchrun is open via ncat
|
||||
|
||||
## Top
|
||||
|
||||
Questions to [David Rotermund](mailto:davrot@uni-bremen.de)
|
||||
|
||||
|
||||
This is my script (connection_test.sh) that tests if a connection between two computer of a given port is possible:
|
||||
|
||||
You need the master_ip and master_port:
|
||||
|
||||
```shell
|
||||
master_ip="10.10.10.10"
|
||||
master_port="40001"
|
||||
python_file="main.py"
|
||||
|
||||
ip_check=`ip addr | grep $master_ip | wc -l`
|
||||
|
||||
if [[ $ip_check == "1" ]]
|
||||
then
|
||||
echo "Master"
|
||||
echo "OK OK OK OK OK OK OK" | ncat -l -p $master_port
|
||||
else
|
||||
echo "Client"
|
||||
ncat $master_ip $master_port
|
||||
```
|
||||
|
||||
If this fails, the port is already used or your firewall settings is blocking it.
|
||||
|
Loading…
Reference in a new issue