hanquansanren commited on
Commit
8d5f45b
·
1 Parent(s): 5c9fa77

Fix MPI library issue

Browse files
app.py CHANGED
@@ -9,8 +9,8 @@ import torch.backends.cudnn
9
  import admin.settings as ws_settings
10
  import os
11
  os.environ["CUDA_VISIBLE_DEVICES"] = "7"
12
- os.environ["OPENAI_LOGDIR"] = "./logs"
13
- os.environ["MPI_DISABLED"] = "1"
14
  import torch
15
  import torch.distributed as dist
16
  import torchvision.transforms as transforms
 
9
  import admin.settings as ws_settings
10
  import os
11
  os.environ["CUDA_VISIBLE_DEVICES"] = "7"
12
+ # os.environ["OPENAI_LOGDIR"] = "./logs"
13
+ # os.environ["MPI_DISABLED"] = "1"
14
  import torch
15
  import torch.distributed as dist
16
  import torchvision.transforms as transforms
packages.txt ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ libopenmpi-dev
2
+ openmpi-bin
3
+
4
+
train_settings/dvd/improved_diffusion/dist_util.py CHANGED
@@ -9,14 +9,14 @@ import socket
9
  import blobfile as bf
10
  import torch as th
11
  import torch.distributed as dist
12
- try:
13
- from mpi4py import MPI
14
- except ImportError:
15
- MPI = None
16
- # from mpi4py import MPI
17
-
18
- if MPI is None or not hasattr(MPI, "COMM_WORLD"):
19
- print("MPI not available, running in single process mode.")
20
 
21
  # Change this to reflect your cluster layout.
22
  # The GPU for a given rank is (rank % GPUS_PER_NODE).
 
9
  import blobfile as bf
10
  import torch as th
11
  import torch.distributed as dist
12
+ # try:
13
+ # from mpi4py import MPI
14
+ # except ImportError:
15
+ # MPI = None
16
+ from mpi4py import MPI
17
+
18
+ # if MPI is None or not hasattr(MPI, "COMM_WORLD"):
19
+ # print("MPI not available, running in single process mode.")
20
 
21
  # Change this to reflect your cluster layout.
22
  # The GPU for a given rank is (rank % GPUS_PER_NODE).