+1 to this fix, I had similar issues a while back except I was getting the following error during make check (or running any mpi code for that matter) after petsc was built:
Fatal error in PMPI_Init_thread: Other MPI error, error stack: MPIR_Init_thread(467)..............: MPID_Init(177).....................: channel initialization failed MPIDI_CH3_Init(70).................: MPID_nem_init(319).................: MPID_nem_tcp_init(171).............: MPID_nem_tcp_get_business_card(418): MPID_nem_tcp_init(377).............: gethostbyname failed, localhost (errno 3) Best regards, Jacob Faibussowitsch (Jacob Fai - booss - oh - vitch) Cell: (312) 694-3391 > On Sep 17, 2020, at 17:59, Satish Balay via petsc-users > <petsc-users@mcs.anl.gov> wrote: > > Here is a fix: > > echo 127.0.0.1 `hostname` | sudo tee -a /etc/hosts > > Satish > > On Thu, 17 Sep 2020, Matthew Knepley wrote: > >> We should have an option to disable the test. >> >> Matt >> >> On Thu, Sep 17, 2020 at 5:31 PM Satish Balay via petsc-users < >> petsc-users@mcs.anl.gov> wrote: >> >>> On Thu, 17 Sep 2020, Mark Adams wrote: >>> >>>> I rebased over master and started getting this error. >>>> I did reinstall MPICH (brew) recently. >>>> Any ideas? >>>> Thanks, >>>> Mark >>> >>> >>> ------------------------------------------------------------------------------- >>> Exception: Your hostname will not work with MPI, perhaps you have VPN >>> running whose network settings may not play well with MPI or your network >>> is misconfigured >>> >>> ******************************************************************************* >>> >>> >>> Ok - this is a new test that got added to check for broken network that >>> breaks MPI. >>> >>> Here is the check: >>> >>> Executing: ping -c 2 MarksMac-302.local >>> >>> The check says you have broken network settings. [as its not responding to >>> ping.] >>> >>> Does MPI work fine on this box? You can try disabling this check >>> (manually) - and do the build, and run >>> >>> Does MPI run fine? >>> >>> Satish >>> >>> >>>>>>>>>>>>>> >>> >>> diff --git a/config/BuildSystem/config/packages/MPI.py >>> b/config/BuildSystem/config/packages/MPI.py >>> index 2e130fdcfe..8464de6773 100644 >>> --- a/config/BuildSystem/config/packages/MPI.py >>> +++ b/config/BuildSystem/config/packages/MPI.py >>> @@ -267,7 +267,7 @@ shared libraries and run with >>> --known-mpi-shared-libraries=1') >>> if ret != 0: >>> raise RuntimeError(errormessage+" Return code %s\n" % ret) >>> except: >>> - raise RuntimeError("Exception: "+errormessage) >>> + pass >>> else: >>> self.logPrint("Unable to get result from hostname, skipping >>> ping check\n") >>> >>> >> >> >