[mpich-discuss] Changes to MPICH2
Pavan Balaji
balaji at mcs.anl.gov
Tue Apr 14 02:01:33 CDT 2009
You can see src/mpid/ch3/src/Makefile.sm for an example Makefile.sm that
compiles a bunch of C files and adds them to the libmpich.a library.
-- Pavan
Eduardo Kienetz wrote:
> On Tue, Apr 7, 2009 at 9:24 AM, Pavan Balaji <balaji at mcs.anl.gov
> <mailto:balaji at mcs.anl.gov>> wrote:
>
> I was able to add my new parameter and when calling configure
> with it,
> I then have #define HAVE_PERUSE set to 1 in mpichconf.h
>
>
> mpichconf.h is autogenerated by configure, so you shouldn't change
> that directly. If you add a AC_DEFINE() inside configure.in
> <http://configure.in>, it'll automatically get added to mpichconf.h
>
>
> I didn't change mpichconf.h directly, I meant that once I called
> configure --enable-peruse it automatically added the HAVE_PERUSE 1 to
> mpichconf.h. Well, at least that I got right :)
>
> My question now is: how do I actually make src/peruse/*.c into MPICH2?
>
> Actually, it's not too complicated once you know how things work.
> First, you need your USE_PERUSE definition to go into mpichconf.h,
> so as I pointed out, it needs a configure.in <http://configure.in>
> change at the top-level. Then, you need simplemake to recognize your
> new directory --- all this means is that you add the src/peruse
> directory into the src/Makefile.sm file (this will generate
> src/Makefile.in). Finally, you want src/Makefile to be generated, so
> configure will need to know about src/Makefile.in; so you want to
> add src/Makefile into the AC_OUTPUT() section of the top-level
> configure. That's it.
>
> I've attached a patch based on the svn trunk for your reference.
>
>
> So, I have followed your instructions, and found out that I also had to
> create an src/peruse/Makefile.sm (when running maint/updatefiles it
> complained about that). So I looked at src/pmi/Makefile.sm and figured
> that since my src/peruse doesn't have any subdirs I could just have:
> SUBDIRS = .
> However, to test if it would compile src/peruse/*.c , I created a
> peruse.c with garbage, that should lead to an error, but it didn't (that
> is, it didn't consider the *.c files) :(
>
> What am I missing? I'm eager to get started with the coding.
>
> Thank you very much,
>
> --
> Eduardo Bacchi Kienetz
--
Pavan Balaji
http://www.mcs.anl.gov/~balaji
More information about the mpich-discuss
mailing list