[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 20010821: building netCDF on 64-bit machines



>To: address@hidden
>From: Crystal Shaw <address@hidden>
>Subject: Re:  20010821: building netCDF on 64-bit machines
>Organization: NCSA
>Keywords: itanium, 64-bit platforms

Crystal,

> Thanks for your suggestions. Using a combination of no optimization and
> gcc, I have now passed nc_test, nctest, fortran, but failed in nf_test.
> 
> sgif90 -o nf_test -O  test_get.o test_put.o nf_error.o nf_test.o test_read.o 
> test_write.o util.o fortlib.o ../libsrc/libnetcdf.a  -lm                      
>      test_get.o: In function `test_nf_get_var1_text_':                        
>        /home/shaw/netcdf-3.5.0/src/nf_test/test_get-tmp.f:1635: undefined 
> reference to `nf_open_'                                                       
>                /home/shaw/netcdf-3.5.0/src/nf_test/test_get-tmp.f:1644: 
> undefined reference to `nf_get_var1_text_'                                    
>                          
> /home/shaw/netcdf-3.5.0/src/nf_test/test_get-tmp.f:1647: undefined reference 
> to `nf_get_var1_text_'                                                        
>      /home/shaw/netcdf-3.5.0/src/nf_test/test_get-tmp.f:1653: undefined 
> reference to `nf_get_var1_text_' 
> 
> It seems I need to go back to the library and compile more files with no
> optimization...

It may be that gcc and sgicc (or was it sgic89?) have different
conventions for calling C from Fortran.  In that case, the C library
routines you have compiled with gcc couldn't be found when trying to
link with Fortran routines, perhaps because the names don't follow the
same rules, for example appending an "_".  If you really need the f90
interface, you might have to either compile everything with gcc or
find some gcc flags that made it match what the sgif90 compiler
expects ...

--Russ