diff --git a/code/makefile b/code/makefile index 08ce780..97cb73c 100644 --- a/code/makefile +++ b/code/makefile @@ -62,11 +62,11 @@ build_info.o : build_info.txt ld -r -b binary -o build_info.o build_info.txt build_info.txt : code_gen/terms.input - echo "build date:" > build_info.txt + echo "<>" > build_info.txt date >> build_info.txt - echo "build base revision" >> build_info.txt + echo "<>" >> build_info.txt git rev-parse HEAD >> build_info.txt - echo "git status" >> build_info.txt + echo "<>" >> build_info.txt git status >> build_info.txt - echo "terms" >> build_info.txt + echo "<>" >> build_info.txt cat code_gen/terms.input >> build_info.txt diff --git a/code/post_dns.f90 b/code/post_dns.f90 index 41f6647..b6f81b5 100644 --- a/code/post_dns.f90 +++ b/code/post_dns.f90 @@ -7,7 +7,11 @@ USE post USE Compact - CALL print_data + character (len=2000) :: input_string + + call cstr(input_string) + + write(*,*) input_string CALL m_openmpi_init diff --git a/code/print_build_info.c b/code/print_build_info.c index 3755e41..2a06dd3 100644 --- a/code/print_build_info.c +++ b/code/print_build_info.c @@ -1,25 +1,19 @@ -#include - extern const char _binary_build_info_txt_start []; extern const char _binary_build_info_txt_end []; +extern const char _binary_build_info_txt_size []; -void print_data_ () +void cstr_( char *s, unsigned long b ) { - char* p = &_binary_build_info_txt_start; - - while ( p != &_binary_build_info_txt_end ) putchar(*p++); -} -/* -*/ - - -void cstr_( char *s, int *b ) -{ /* return n copies of arg */ - int count = 0; char* p = &_binary_build_info_txt_start; - while ( p != &_binary_build_info_txt_end ) + + while ( p != &_binary_build_info_txt_end && count < b ) { s[count++] = *p++; } + + while ( count < b ) + { + s[count++] = ' '; + } } diff --git a/code/test_calculate.f90 b/code/test_calculate.f90 index 7dc83a7..058a108 100644 --- a/code/test_calculate.f90 +++ b/code/test_calculate.f90 @@ -18,7 +18,11 @@ real*4, dimension(2) :: startt real*4, dimension(2) :: endt real*4 :: result -call print_data +character (len=2000) :: input_string + +call cstr(input_string) + +write(*,*) input_string nxp = 512 nyp = 256