<div dir="ltr">Hi,<div>Now I'm trying to build petsc-dev next in cygwin with the threadcomm/OpenMP package (CUDA also but I solved my build issues for this already).</div><div><br></div><div>I successfully configured and built, however I ran into 3 problems.</div><div><br></div><div>1) I don't think that the OpenMP package should depend on pthreadsclasses.py</div><div>In openmp.py, I commented out lines 17-18:</div><div><div>    #self.pthreadclasses = framework.require('PETSc.packages.pthreadclasses',self)</div><div>    #self.deps = [self.pthreadclasses]</div></div><div><br></div><div>2) Then, in include/petscerror.h.</div><div>line 409:</div><div>#if defined(PETSC_HAVE_PTHREADCLASSES) || defined (PETSC_HAVE_OPENMP)<br></div><div><div>...</div><div>#include <pthread.h></div><div>#endif</div></div><div><br></div><div>should be</div><div><br></div><div>#if defined(PETSC_HAVE_PTHREADCLASSES)<br></div><div>...</div><div>#include <pthread.h></div><div>#endif</div><div><br></div><div>3) Also, in include/petscerror.h</div><div>PETSC_EXTERN PetscStack *petscstack;<br></div><div>#pragma omp threadprivate(petscstack)<br></div><div><br></div><div>doesn't work in recent visual studio compilers (<a href="http://stackoverflow.com/questions/12560243/using-threadprivate-directive-in-visual-studio">http://stackoverflow.com/questions/12560243/using-threadprivate-directive-in-visual-studio</a>):</div><div><br></div><div>I commented out the 2 lines above and replaced with:</div><div>PETSC_EXTERN __declspec(thread) PetscStack *petscstack;</div><div><br></div><div>I doubt this is the correct solution for all architectures. Perhaps someone more familiar with this OpenMP code can suggest other changes which might be necessary.</div><div><br></div><div>-Paul</div></div>