[petsc-dev] BuildSystem fixes needed

Barry Smith bsmith at mcs.anl.gov
Mon Oct 31 22:02:27 CDT 2011


On Oct 31, 2011, at 9:43 PM, Jed Brown wrote:

> On Mon, Oct 31, 2011 at 14:09, Barry Smith <bsmith at mcs.anl.gov> wrote:
> First problem, your configure tests use int main() instead of the (correct?)  int main(int, char**);
> 
> Both are correct, see C99 section 5.1.2.2.1.

   Regardless, Matt still needs to make this change; and why shouldn't he, all systems support  int main(int, char**).
> 
>  
>  This fails with A-MPI because it actually has to change main() to virtualize things.
> 
> What is it changing?

  A-MPI "replaces" each single Unix process with a collection of threads (that each behave like processes with regard to MPI) hence the users entry point cannot be called main() because main is called once by the OS when it starts up the Unix process. Thus the A-MPI mpi.h changes the users main() routine to a different name and the A-MPI startup system calls this new routine for each of these threads/pseudo-MPI processes.


   Barry




More information about the petsc-dev mailing list