[MOAB-dev] Re-arranging MOAB source
Tim Tautges
tautges at mcs.anl.gov
Fri Jan 8 08:56:43 CST 2010
[Rolling up several separate emails with comments...]
Jason Kraftcheck wrote:
>>> Any features that are to be usable by other tools should go into moab/.
>>> Other stuff should be in tools/.
>> Then I think we need something like "core" inside moab, to distinguish
>> the core stuff from the utils. Or, make a utils directory (which
>> wouldn't be a bad idea either, for trees and other stuff).
>>
>
> Or just put the utils in subdirectories of MOAB, and leave the core stuff in
> the top-level directory. Or perhaps create more top-level directories than
> just moab/ if there are other libraries that may be used w/out MOAB.
>
The distinction I was thinking of here, and that we should have a distinct policy on, is that anything outside the moab/
subdir should use only installed include files. I'm not sure there's an easy way to check that w/o complicating the .am
files too mcuh, but we should at least try for that policy.
>>> #include "moab/exodus_order.h"
>> I've always found subdirs in #includes annoying. Why not just put
>> -Imoab and reference exodus_order.h directly?
>
> If I have a class named Vector3D in Mesquite, and MOAB has a class named
> Vector3D, then I cannot use both tools together unless at least one of those
> classes is in some namespace other than the top level-one. Namespaces solve
> this issue for class names. However, I also need to include the headers
> defining each header. If both Mesquite and MOAB use the conventional name
> of Vector3D.hpp, how do I include both? If one is going to use the
> classname->filename convention for C++ headers, then there must also be a
> namespace for the headers.
This one I feel strongly about. Unless we can point to an example that's either already happening or close, I'd like to
stick with a flat include directory.
>> Instead of separate m4 and cmake subdirs, what about a config subdir
>> with m4 and cmake below that?
>>
>
> That contradicts your argument above that we should use 'src' rather than
> 'moab' because it is more common. As I said in a previous message, I'm not
> sure that 'src' actually is more common, but using the default subdirs for
> these build systems definitely is more common.
>
Nothing's black and white here. I like src not only because it seems more common, but because a non-negligible portion
of our developers will be going there. I see very few developers going into the config stuff.
In summary, I can live with moab/ being the main moab source dir, would like examples at the top level, and would like
the config stuff below config. The resulting layout is:
moab/
parallel/
itaps/
io/
util/
examples/
doc/
doxygen/
test/
parallel/
itaps/
io/
tools/
refiner/
dagmc/
mbcoupler/
...
contrib/
config/
cmake/
m4/
Does anybody have any more comments, besides the ones already raised?
- tim
>
>>>> How would naming the source directory moab help with namespacing, other
>>>> than perceptually? If it's just perceptual, then I think we should
>>>> balance that against the familiarity that src has.
>>>>
>>> The directory name could serve as a "namespace" for header files. For
>>> example:
>>> #include "moab/exodus_order.h"
>> I've always found subdirs in #includes annoying. Why not just put
>> -Imoab and reference exodus_order.h directly?
>
> If I have a class named Vector3D in Mesquite, and MOAB has a class named
> Vector3D, then I cannot use both tools together unless at least one of those
> classes is in some namespace other than the top level-one. Namespaces solve
> this issue for class names. However, I also need to include the headers
> defining each header. If both Mesquite and MOAB use the conventional name
> of Vector3D.hpp, how do I include both? If one is going to use the
> classname->filename convention for C++ headers, then there must also be a
> namespace for the headers.
>
> Also, I don't think we
>> should install into a bunch of subdirs under include, and tools (and
>> examples) should look as much as possible like apps outside moab.
>>
>
> I don't see a) a problem with subdirs under include or b) the relevance of apps.
>
>
> - jason
>
--
================================================================
"You will keep in perfect peace him whose mind is
steadfast, because he trusts in you." Isaiah 26:3
Tim Tautges Argonne National Laboratory
(tautges at mcs.anl.gov) (telecommuting from UW-Madison)
phone: (608) 263-8485 1500 Engineering Dr.
fax: (608) 263-4499 Madison, WI 53706
More information about the moab-dev
mailing list