[petsc-users] running Petsc programs without a connection.
Satish Balay
balay at mcs.anl.gov
Fri Mar 27 10:27:46 CDT 2015
On Thu, 26 Mar 2015, Matthew Knepley wrote:
> On Thu, Mar 26, 2015 at 2:15 AM, Sanjay Kharche <
> Sanjay.Kharche at manchester.ac.uk> wrote:
>
> >
> > Dear All
> >
> > I have a fedora pc which some times cannot have an internet connection. I
> > found that I can run non-Petsc MPI programs when it is not connected to the
> > internet. However, when I try to run my Petsc based program without a
> > connection, I get the following error. By googling a little bit, I found
> > that the mpi launcher requires to log into each of the 4 procs the pc has,
> > and may be using ssh. This or something else may or may not require an
> > internet connection. In my present installation of petsc, I have downloaded
> > and installed all required dependencies (blas, lapack, sundials) including
> > mpich during the configure. I am using a makefile that I took from the ts
> > examples for ex15.c where I changed the ex15 entry to sk2d (my program). I
> > updated the petsc independent mpich to be the same version as the one I got
> > with petsc.
> >
> > Is there a way of configuring or otherwise to get Petsc programs to run
> > when I do not have an internet connection?
> >
> > the error:
> >
> > mpiexec -n 3 ./sk2d
> > Fatal error in PMPI_Init_thread: Other MPI error, error stack:
> > MPIR_Init_thread(498)..............:
> > MPID_Init(187).....................: channel initialization failed
> > MPIDI_CH3_Init(89).................:
> > MPID_nem_init(320).................:
> > MPID_nem_tcp_init(171).............:
> > MPID_nem_tcp_get_business_card(418):
> > MPID_nem_tcp_init(377).............: gethostbyname failed,
> > sanjayslaptop.maths.liv.ac.uk (errno 2)
> >
>
> This is not PETSc, but rather the way MPICH is configured. I run using
>
> -n 3 -hosts localhost,localhost,localhost
>
> and it will run fine disconnected.
>
> Satish, is there a general fix?
Presumably non-petsc MPI programs are using a different install of MPI [openmpi?] that doesn't
have this problem - so one could install PETSc with that.
The other alternative is to configure the laptop/machine to use 'name' that works
with gethostbyname() all the time. I do the following:
1. make sure the hostname is in /etc/hostname
$ cat /etc/hostname
asterix
[one is supporsed to use hostnamectl - but I don't really understand this command.
soemtimes the hostname is not saved across reboots]
2. Add an entry to /etc/hosts to resolve the set hostname. I have the following entry:
127.0.0.1 asterix
Satish
>
> Thanks,
>
> Matt
>
>
> >
> > cheers
> > Sanjay
> >
>
>
>
>
More information about the petsc-users
mailing list