You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In porting a code to use LibGeoDecomp I found that for any enum type Cell variables the typemap generator tool fails to create code in the generated typemaps.h to define the corresponding lookup function which is called from the generated typemaps.cpp (within generateMapCell()), meant to return a suitable MPI_Datatype for that enum. The result therefore fails to compile, complaining about the missing lookup function.
This problem can be reproduced in the typemap generator example ("sample") included in the most recent version of the LibGeoDecomp, at least in my hands:
In typemaps.cpp that is generated there appears the following lookup call, in generateMapCell():
But typemaps.h does not have lookup<Fuel > defined.
The underlying type of unscoped default type-unspecified C++ enums is implementation defined, usually int, so actually no new lookup function is needed and the call in generateMapCell() can be replaced with:
I've checked this compiles (after also modifying MPI::CAR to MPI_CAR in main.cpp) and runs, and it seems happy.
It seems to me like this issue should be resolved by modifying the typemap generator tool. The comments in mpiparser.rb suggest the intention was always to create a lookup call for integer type within typemaps.cpp, but in my hands this is not what is generated. I can't immediately tell whether the issue is in lookup_type("int") in mpiparser.rb not returning int type or whether there is an issue in generate_single_map inside mpigenerator.rb.
It's possible of course that the issue I encountered is simply due to an unforeseen interaction between my environment and that used when the typemap generator tool was created. I ran this using the supplied doxygen.conf, with doxygen version 1.8.15, ruby version 2.6.2p47, under macOS.
If I can help or provide further information let me know.
The text was updated successfully, but these errors were encountered:
Hi,
In porting a code to use LibGeoDecomp I found that for any enum type Cell variables the typemap generator tool fails to create code in the generated
typemaps.h
to define the corresponding lookup function which is called from the generatedtypemaps.cpp
(withingenerateMapCell()
), meant to return a suitable MPI_Datatype for that enum. The result therefore fails to compile, complaining about the missing lookup function.This problem can be reproduced in the typemap generator example ("sample") included in the most recent version of the LibGeoDecomp, at least in my hands:
In
typemaps.cpp
that is generated there appears the following lookup call, ingenerateMapCell()
:But
typemaps.h
does not havelookup<Fuel >
defined.The underlying type of unscoped default type-unspecified C++ enums is implementation defined, usually
int
, so actually no new lookup function is needed and the call ingenerateMapCell()
can be replaced with:I've checked this compiles (after also modifying MPI::CAR to MPI_CAR in main.cpp) and runs, and it seems happy.
It seems to me like this issue should be resolved by modifying the typemap generator tool. The comments in
mpiparser.rb
suggest the intention was always to create a lookup call for integer type withintypemaps.cpp
, but in my hands this is not what is generated. I can't immediately tell whether the issue is inlookup_type("int")
inmpiparser.rb
not returning int type or whether there is an issue ingenerate_single_map
insidempigenerator.rb
.It's possible of course that the issue I encountered is simply due to an unforeseen interaction between my environment and that used when the typemap generator tool was created. I ran this using the supplied doxygen.conf, with doxygen version 1.8.15, ruby version 2.6.2p47, under macOS.
If I can help or provide further information let me know.
The text was updated successfully, but these errors were encountered: