Table 5: Program files and ratio of auto-generated for the
simulation of solving linear advection equation.
Program files Language Lines
Ratio of
auto-
generated
Main.C C++ 237 100%
VariableManager.h C++ 59 100%
VariableManager.C C++ 152 100%
LinAdvLevelStrategy.h C++ 92 100%
LinAdvLevelStrategy.C C++ 99 100%
ICPInitComp.h C++ 33 100%
ICPInitComp.C C++ 58 100%
ICPDtComp.h C++ 42 100%
ICPDtComp.C C++ 90 100%
ICPFluxComp.h C++ 40 100%
ICPFluxComp.C C++ 106 100%
ICPConnComp.h C++ 40 100%
ICPConnComp.C C++ 90 100%
ICPUpdateComp.h C++ 40 100%
ICPUpdateComp.C C++ 86 100%
ICPAllocComp.h C++ 26 100%
ICPAllocComp.C C++ 35 100%
LinAdvFort.h C 33 100%
TypeDefs.h C 26 100%
typedef.f90 Fortran 29 100%
initset.f90 Fortran 42 50%
getdt.f90 Fortran 23 70%
setphy.f90 Fortran 59 50%
getflux.f90 Fortran 64 50%
updateconser.f90 Fortran 60 60%
acceptsolution.f90 Fortran 40 70%
CMakeLists.txt CMake 246 100%
5 CONCLUSIONS
Parallel programming usually involves tedious
amount of coding and often error-prone for domain
experts. HiPro-CodeGen, a powerful automatic code
generation engine, is developed to generate major
and tedious part of a JASMIN application. Plenty of
knowledge and technologies are shielded from the
programmers, including:
Object-oriented programming
C++ language
Hybrid programming with C++ and Fortran
Component-based programming
It frees users from unnecessary exposure to
complex features of programming issues of
languages and JASMIN interfaces together with the
application code organization. Users only need to
write body code for numerical kernels with well-
defined interface through GUI in Fortran which has
been used for scientific computing program
development for tens of years and is quite familiar to
them.
Practice demonstrates that non-programmers can
create fairly complex programs with little training. It
greatly reduces programming complexities and make
numerical application development easy and fast.
Real world applications show that HiPro-CodeGen
ensures high-performance and high-quality for
scientific numerical simulation.
ACKNOWLEDGEMENTS
This work is under the auspices of the National
Natural Science Foundation of China (61033009),
National Basic Key Research Special Fund
(2011CB309702) and National High Research and
Development Program of China (2012AA01A309).
REFERENCES
Benjamin A. A., Robert A.,David E. B.,etc. 2006. A
component architecture for high-performance
scientific computing. The International Journal of
High Performance Computing Applications,20(2):162-
202
Boris S.,Alexey S.,Vera I. Integrated Development
Environment for Visual parallel programming. In
Proceedings of the 10
th
Conference of Fruct
Association.
Liao L., Zhang A.Q., Yang Z., etc. IDE-JASMIN:An
Interactive Graphical Approach for Parallel
Programming in Scientific Computing. 8th
International Conference on Software Engineering
and Applications.
Mo Z.Y., Pei W.B., 2009. Scientific computing
application codes. Physics (in Chinese).
Mo Z.Y., Zhang A.Q., 2010. JASMIN: A parallel software
infrastructure for scientific computing. Front. Comput.
Sci. China.
Mo Z.Y., Zhang A.Q., 2009. User’s guide for JASMIN,
Technical Report. https://www.iapcm.ac.cn/jasmine.
Parker, S.G., 2002. A component-based architecture for
parallel multi-physics PDE simulation. In Proceedings
of the International Conference on Computational
Science-Part III. Springer-Verlag.
Pei W.B., Zhu S.P., 2009. Scientific computing in Laser
Fusion. Physics (in Chinese), 38(8): 559-568.
Tia W. 2004.The SFC Editor a graphical tool for
algorithm development. Jounal of Computing Science
in Colleges.
HiPro-CodeGen-AutomaticProgrammingforParallelNumericalSimulations
131