Skip to content

Commit

Permalink
Adds workaround when hostname cannot be resolved (#393)
Browse files Browse the repository at this point in the history
* Adds workaround when hostname cannot be resolved

* temporarily upload to cdat/label/resolve_hostname

Co-authored-by: muryanto1 <[email protected]>
  • Loading branch information
jasonb5 and LinaMuryanto authored Jul 2, 2020
1 parent 7195305 commit 17d9488
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions regrid2/Lib/mvESMFRegrid.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,21 @@
"""
ESMF regridding class
"""
import os
import re
import socket
import numpy

import ESMF
from . import esmf
from . import RegridError
from .mvGenericRegrid import GenericRegrid

try:
socket.gethostbyname(socket.gethostname())
except Exception:
os.environ['MPICH_INTERFACE_HOSTNAME'] = 'localhost'

ESMF.Manager(debug=False)
HAVE_MPI = False
try:
Expand Down

0 comments on commit 17d9488

Please sign in to comment.