Re: [myrinet] Question regarding threads and GM
Pete Wyckoff <[email protected]>
| Newsgroups | gmane.network.myrinet.general |
|---|---|
| Message-ID | <[email protected]> |
[email protected] said: > I was wondering what are the extents to which you can use threading/forking > in a mpich over gm or straight gm type program. I know that system() and > fork() calls are fine as long as they are called before mpi_init(). But what > about pthread_create(). > > Can you create a few threads before executing mpi_init() as long as only one > of those threads used the mpi functions? Or is threading completely > forbiden? > > I am running Red Hat linux 7.1, mpich over GM 1.2..5 and GM 1.4pre48 Using pthread_create() should also be fine in that context. The only place you get yourself into trouble is if some pages had been registered by GM, then the fork happens, then the child changes the PTEs of those pages and your box falls over. In fact, with all the threads sharing the vma the above scenario should not be able to happen. I will point out that I've not tried this myself. -- Pete