ECC-320: bufr_dump -Dfortran

This commit is contained in:
Shahram Najm 2016-09-13 17:59:24 +01:00
parent d5540caf51
commit 0d7888c78b
3 changed files with 7 additions and 5 deletions

View File

@ -112,6 +112,7 @@ list( APPEND tests2
)
if( HAVE_FORTRAN AND ENABLE_EXTRA_TESTS )
list(APPEND tests2 bufr_dump_encode_fortran)
list(APPEND tests2 bufr_dump_decode_fortran)
endif()
if( ENABLE_EXTRA_TESTS )
list(APPEND tests2 bufr_dump_encode_C)

View File

@ -64,7 +64,7 @@ do
# Compile
if [ $COMPILE_AND_RUN -eq 1 ]; then
$COMPILER -ffree-line-length-0 -g -o $tempExe $tempSrc $FLAGS_COMPILER $FLAGS_LINKER
# valgrind --error-exitcode=1 ./$tempExe
# valgrind --error-exitcode=1 --track-origins=yes ./$tempExe $filePath
./$tempExe $filePath
fi

View File

@ -378,7 +378,7 @@ int grib_tool_finalise_action(grib_runtime_options* options)
fprintf(stdout,"set pack=1;\nwrite;\n");
}
if (!strcmp(options->dump_mode,"fortran")) {
fprintf(stdout,"end program bufr_create_message\n");
fprintf(stdout,"end program bufr_encode\n");
}
if (!strcmp(options->dump_mode,"C")) {
fprintf(stdout," return 0;\n");
@ -388,7 +388,7 @@ int grib_tool_finalise_action(grib_runtime_options* options)
fprintf(stdout,"\n\n");
fprintf(stdout,"def main():\n");
fprintf(stdout," try:\n");
fprintf(stdout," bufr_create_message()\n");
fprintf(stdout," bufr_encode()\n");
fprintf(stdout," except CodesInternalError as err:\n");
fprintf(stdout," traceback.print_exc(file=sys.stderr)\n");
fprintf(stdout," return 1\n");
@ -403,7 +403,8 @@ int grib_tool_finalise_action(grib_runtime_options* options)
}
if (!strcmp(options->dump_mode,"fortran")) {
fprintf(stdout,"\n call codes_close_file(ifile)\n");
fprintf(stdout,"end program bufr_decode\n");
}
if (!strcmp(options->dump_mode,"C")) {
fprintf(stdout," return 0;\n");
@ -413,7 +414,7 @@ int grib_tool_finalise_action(grib_runtime_options* options)
fprintf(stdout,"\n\n");
fprintf(stdout,"def main():\n");
fprintf(stdout," try:\n");
fprintf(stdout," bufr_decode_message()\n");
fprintf(stdout," bufr_decode()\n");
fprintf(stdout," except CodesInternalError as err:\n");
fprintf(stdout," traceback.print_exc(file=sys.stderr)\n");
fprintf(stdout," return 1\n");