[petsc-dev] PETSc 3.5.0 compilation on Windows and OpenMP with pthread

Satish Balay balay at mcs.anl.gov
Thu Jul 3 08:48:29 CDT 2014


On Thu, 3 Jul 2014, Baros Vladimir wrote:

> So it could be that the external packages were using OpenMP because compiled applications from my build require an openmp dll.
> 
> With this build I compiled a static version of pthreads-win32 from here:
> https://www.sourceware.org/pthreads-win32/
> 
> and PETSc compiled with those libs. Also configuration stage passed without problems.
> 
> But at the end the tests failed with the unresolved PetscThreadCommCreate_PThread

I'm not sure how you are building petsc [logs?] but PetscThreadCommCreate_PThread should
not be refered to unless PETSC_HAVE_PTHREADCLASSES is defined. And if this
flag is defined PetscThreadCommCreate_PThread() would also be compield in.

But then configure disables --with-pthreadclasses option for petsc-3.4, petsc-3.5


balay at asterix /home/balay/petsc (maint)
$ git grep PetscThreadCommCreate_PThread
src/sys/threadcomm/impls/pthread/tcpthread.c:#define __FUNCT__ "PetscThreadCommCreate_PThread"
src/sys/threadcomm/impls/pthread/tcpthread.c:PETSC_EXTERN PetscErrorCode PetscThreadCommCreate_PThread(PetscThreadComm tcomm)
src/sys/threadcomm/impls/pthread/tcpthreadimpl.h:PETSC_EXTERN PetscErrorCode PetscThreadCommCreate_PThread(PetscThreadComm);
src/sys/threadcomm/interface/threadcommregi.c:PETSC_EXTERN PetscErrorCode PetscThreadCommCreate_PThread(PetscThreadComm);
src/sys/threadcomm/interface/threadcommregi.c:  ierr = PetscThreadCommRegister(PTHREAD, PetscThreadCommCreate_PThread);CHKERRQ(ierr);


Satish
> 
> 
> Vladimir
> 
> -----Original Message-----
> From: Jed Brown [mailto:jed at jedbrown.org] 
> Sent: Thursday, July 03, 2014 15:26
> To: Baros Vladimir; petsc-dev at mcs.anl.gov
> Cc: Shrirang G. Abhyankar
> Subject: Re: [petsc-dev] PETSc 3.5.0 compilation on Windows and OpenMP with pthread
> 
> Baros Vladimir <vbaros at hsr.ch> writes:
> > previously I successfully built PETSc with Intel compiler (the last 
> > successful build was 3.4.4) using OpenMP libraries.
> >
> > In version 3.5.0, OpenMP package depends on pthread library which 
> > doesn't exist on Windows.  Why this new requirement and what do you 
> > recommend to use on Windows?
> 
> Your old Windows configuration of PETSc was not actually using OpenMP.
> 
> 
> The threaded implementations use a "thread communicator" which was activated by the optional package "pthreadclasses".  OpenMP is not used by PETSc without "threadcomm" and we are refactoring the whole thing so please don't use it at this time.
> 




More information about the petsc-dev mailing list