Quote:
Originally Posted by colucix
What do you mean for Fortran scripts? Are they Fortran codes that have to be re-compiled again or are they shell wrappers that run already compiled Fortran programs? In both cases, you have to re-compile the Fortran code, since doubtfully the executable can work on different machines, unless you have the exact same CPU.
|
I think I need to recompile them for my machine. The machines are different so are the versions of gcc I have installed.
By the way I don't have a clue what I need to do to recompile them.
I don't even know how I can see the actual code.
I will display some of the commands I runned maybe they will be a bit more helpfull.
When I run one of the scripts I get the following.
./wgrib2 -vt -d 1 gfs.t12z.master.grbf12 >out_time
*** FATAL ERROR: grib message #1 not found ***
When I try to debug the script i get the following
g++ wgrib2
wgrib2(.data+0x4): In function `__data_start':
: multiple definition of `__dso_handle'
/usr/lib/gcc/x86_64-redhat-linux/3.4.6/crtbegin.o(.data+0x0): first defined here
wgrib2(.init+0x0): In function `_init':
/usr/src/build/231499-i386/BUILD/glibc-2.3.2-20030313/build-i386-linux/csu/crti.S:35: multiple definition of `_init'
/usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../lib64/crti.o(.init+0x0): first defined here
wgrib2(.text+0x0): In function `_start':
../sysdeps/i386/elf/start.S:47: multiple definition of `_start'
/usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../lib64/crt1.o(.text+0x0): first defined here
wgrib2(.fini+0x0): In function `_fini':
/usr/src/build/231499-i386/BUILD/glibc-2.3.2-20030313/build-i386-linux/csu/crti.S:51: multiple definition of `_fini'
/usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../lib64/crti.o(.fini+0x0): first defined here
wgrib2(*ABS*+0x808ce9c): In function `__init_array_start':
jpc_qmfb.c: multiple definition of `_GLOBAL_OFFSET_TABLE_'
/usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../lib64/crt1.o(.got.plt+0x0): first defined here
wgrib2(.rodata+0x4): multiple definition of `_IO_stdin_used'
/usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../lib64/crt1.o(.rodata+0x0): first defined here
wgrib2(.data+0x0): In function `__data_start':
: multiple definition of `__data_start'
/usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../lib64/crt1.o(.data+0x0): first defined here
/usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../lib64/crt1.o(.dynamic+0x0): multiple definition of `_DYNAMIC'
/usr/bin/ld: warning: i386 architecture of input file `wgrib2' is incompatible with i386:x86-64 output
collect2: ld returned 1 exit status
As far as I can understand it seems like there is a problem with some of the libraries it uses?
Is there a way I can find out, against which libraries this script is compiled to?
I don't even know if this is what I am supposed to be looking for?
When i try to run some other script I get as well some error messages.
./script_correct_crain
list in: end of file
apparent state: unit 20 named fort.20
last format: list io
lately reading direct formatted external IO
./script_correct_crain: line 8: 26456 Aborted ./read_rain.e
mv: cannot stat `fort.22': No such file or directory
list in: end of file
apparent state: unit 20 named fort.20
last format: list io
lately reading direct formatted external IO
./script_correct_crain: line 13: 26460 Aborted ./read_rain.e
mv: cannot stat `fort.22': No such file or directory
When I run ./read_rain.e
list in: end of file
apparent state: unit 20 named fort.20
last format: list io
lately reading direct formatted external IO
Aborted
g++ read_rain.e
collect2: ld terminated with signal 11 [Segmentation fault]
read_rain.e(.init+0x0): In function `_init':
/build/buildd/glibc-2.3.6/build-tree/amd64-libc/csu/crti.S:25: multiple definition of `_init'
/usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../lib64/crti.o(.init+0x0): first defined here
read_rain.e(.text+0x0): In function `_start':
../sysdeps/x86_64/elf/start.S:65: multiple definition of `_start'
/usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../lib64/crt1.o(.text+0x0): first defined here
read_rain.e(.fini+0x0): In function `_fini':
/build/buildd/glibc-2.3.6/build-tree/amd64-libc/csu/crti.S:37: multiple definition of `_fini'
/usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../lib64/crti.o(.fini+0x0): first defined here
read_rain.e(.rodata+0x0): multiple definition of `_IO_stdin_used'
/usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../lib64/crt1.o(.rodata+0x0): first defined here
read_rain.e(.data+0x0): In function `__data_start':
: multiple definition of `__data_start'
/usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../lib64/crt1.o(.data+0x0): first defined here