mirror of https://github.com/ecmwf/eccodes.git
ECC-320: bufr_dump -Dfortran
This commit is contained in:
parent
d5540caf51
commit
0d7888c78b
|
@ -112,6 +112,7 @@ list( APPEND tests2
|
||||||
)
|
)
|
||||||
if( HAVE_FORTRAN AND ENABLE_EXTRA_TESTS )
|
if( HAVE_FORTRAN AND ENABLE_EXTRA_TESTS )
|
||||||
list(APPEND tests2 bufr_dump_encode_fortran)
|
list(APPEND tests2 bufr_dump_encode_fortran)
|
||||||
|
list(APPEND tests2 bufr_dump_decode_fortran)
|
||||||
endif()
|
endif()
|
||||||
if( ENABLE_EXTRA_TESTS )
|
if( ENABLE_EXTRA_TESTS )
|
||||||
list(APPEND tests2 bufr_dump_encode_C)
|
list(APPEND tests2 bufr_dump_encode_C)
|
||||||
|
|
|
@ -64,7 +64,7 @@ do
|
||||||
# Compile
|
# Compile
|
||||||
if [ $COMPILE_AND_RUN -eq 1 ]; then
|
if [ $COMPILE_AND_RUN -eq 1 ]; then
|
||||||
$COMPILER -ffree-line-length-0 -g -o $tempExe $tempSrc $FLAGS_COMPILER $FLAGS_LINKER
|
$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
|
./$tempExe $filePath
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -378,7 +378,7 @@ int grib_tool_finalise_action(grib_runtime_options* options)
|
||||||
fprintf(stdout,"set pack=1;\nwrite;\n");
|
fprintf(stdout,"set pack=1;\nwrite;\n");
|
||||||
}
|
}
|
||||||
if (!strcmp(options->dump_mode,"fortran")) {
|
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")) {
|
if (!strcmp(options->dump_mode,"C")) {
|
||||||
fprintf(stdout," return 0;\n");
|
fprintf(stdout," return 0;\n");
|
||||||
|
@ -388,7 +388,7 @@ int grib_tool_finalise_action(grib_runtime_options* options)
|
||||||
fprintf(stdout,"\n\n");
|
fprintf(stdout,"\n\n");
|
||||||
fprintf(stdout,"def main():\n");
|
fprintf(stdout,"def main():\n");
|
||||||
fprintf(stdout," try:\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," except CodesInternalError as err:\n");
|
||||||
fprintf(stdout," traceback.print_exc(file=sys.stderr)\n");
|
fprintf(stdout," traceback.print_exc(file=sys.stderr)\n");
|
||||||
fprintf(stdout," return 1\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")) {
|
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")) {
|
if (!strcmp(options->dump_mode,"C")) {
|
||||||
fprintf(stdout," return 0;\n");
|
fprintf(stdout," return 0;\n");
|
||||||
|
@ -413,7 +414,7 @@ int grib_tool_finalise_action(grib_runtime_options* options)
|
||||||
fprintf(stdout,"\n\n");
|
fprintf(stdout,"\n\n");
|
||||||
fprintf(stdout,"def main():\n");
|
fprintf(stdout,"def main():\n");
|
||||||
fprintf(stdout," try:\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," except CodesInternalError as err:\n");
|
||||||
fprintf(stdout," traceback.print_exc(file=sys.stderr)\n");
|
fprintf(stdout," traceback.print_exc(file=sys.stderr)\n");
|
||||||
fprintf(stdout," return 1\n");
|
fprintf(stdout," return 1\n");
|
||||||
|
|
Loading…
Reference in New Issue