PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

32-bit vs 64-bit, compile & link problems

 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling
View previous topic :: View next topic  
Author Message
t_arbetter



Joined: 01 Jun 2005
Posts: 2

PostPosted: Wed Jun 01, 2005 2:52 pm    Post subject: 32-bit vs 64-bit, compile & link problems Reply with quote

I am trying to port a version of MOM3 that successfully compiles on
the following 32-bit Linux machine (running SUSE 9.x):

[snowmiser] ~/MOM_3.0/EXP/NOW/MOM_UPDATES 405> uname -a
Linux snowmiser 2.6.5-7.151-smp #1 SMP Fri Mar 18 11:31:21 UTC 2005 i686 i686 i386 GNU/Linux

to the following 64-bit Linux machine (running gentoo r14 2.6.9).
[portage]> uname -a
Linux portage 2.6.9-gentoo-r14 #1 SMP Wed Feb 23 10:47:14 EST 2005 x86_64 AMD Opteron(tm) Processor 244 AuthenticAMD GNU/Linux

On snowmiser it compiled with pgf90 v5.2-4 (32-bit). This code was successfully ported from an SGI.

On portage we have tried using the evaluation copies of pgf90 6.0-4 and 5.2-4 (64-bit) and have consitently found errors. In all cases, the
following options were used:

-r8 -i4 -fast -time -Minfo=all -Minform=severe -byteswapio -v

The first problematic file is also the first one it tries to compile. This
contains software modules which call certain intrinsics. The output for the compile step of the problematic file (mpp.F90) looks like (using the verbose option) for the compile step (-c option):

mpp.F90

/usr/pgi/linux86-64/6.0/bin/pgf901 mpp.F90 -opt 2 -inform severe -nohpf -nostatic -x 19 0x400000 -quad -x 59 4 -x 15 2 -x 49 0x400004 -x 51 0x20 -x 57 0x4c -x 58 0x10000 -x 124 0x1000 -x 57 0xfb0000 -x 58 0x78031040 -x 70 0x6c00 -x 48 4608 -x 49 0x100 -x 120 0x200 -stdinc /usr/pgi/linux86-64/6.0/include:/usr/local/include:/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/include:/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/include:/usr/include -def unix-def __unix -def __unix__ -def linux -def __linux -def __linux__ -def __inline__= -def __NO_INLINE__ -def __NO_MATH_INLINES -def __x86_64__ -def __LONG_MAX__=9223372036854775807L -def '__SIZE_TYPE__=unsigned long int' -def '__PTRDIFF_TYPE__=long int' -def __THROW= -def __amd64__ -idir /usr/include/ -idir /usr/include/ -def snapshots -def energy_analysis -def levitus_ic -def read_my_kmt -def obc_south -def obc_north -def obc_west -def time_varying_sbc_data -def nowgrid -def read_lookup -def constvmix -def robert_time_filter -def tracer_horz_laplacian -def tracer_horz_mix_const -defecmwf -def velocity_horz_laplacian -def velocity_horz_mix_var -def am_cosine -def sgi -def ramdrive -def generate_a_grid -def read_my_kmt -def fill_perimeter_violations -def fill_isolated_cells -def smooth_topo -def round_shallow -def stream_function -def sf_9_point -def use_netCDF -preprocess -freeform -i4 -x 125 2 -x 70 2 -vect 48 -x 124 0x8 -x 0 319 -output /tmp/pgf90aaaaasqgab.ilm
PGF90/any Linux/x86-64 6.0-4: compilation successful

/usr/pgi/linux86-64/6.0/bin/pgf902 /tmp/pgf90aaaaasqgab.ilm -fn mpp.F90 -opt 2 -inform severe -x 51 0x20 -x 119 0xa10000 -x 122 0x40 -x 123 0x1000-x 127 4 -x 19 0x400000 -quad -x 120 0x80000000 -x 59 4 -y 80 0x1000 -x 80 0x10800000 -x 124 0x1400 -y 15 2 -y 80 0x1000 -x 80 0x10800000 -x 57 0x3b0000 -x 58 0x48000000 -x 49 0x100 -x 120 0x200 -astype 0 -x 121 1 -x 124 1 -x 9 1 -x 42 0x14200000 -x 72 0x1 -x 136 0x11 -x 92 1 -x 0 1 -x 0 63 -cmdline '+pgf90 /tmp/pgf90aaaaasqgab.ilm -L/usr/lib/gcc-lib/x86_64-pc-linux-gnu/3.4.3 -v -r8 -i4 -fast -time -Minfo=all -Minform=severe -byteswapio-Mbounds -Dsnapshots -Denergy_analysis -Dlevitus_ic -Dread_my_kmt -Dobc_south -Dobc_north -Dobc_west -Dtime_varying_sbc_data -Dnowgrid -Dread_lookup -Dconstvmix -Drobert_time_filter -Dtracer_horz_laplacian -Dtracer_horz_mix_const -Decmwf -Dvelocity_horz_laplacian -Dvelocity_horz_mix_var -Dam_cosine -Dsgi -Dramdrive -Dgenerate_a_grid -Dread_my_kmt -Dfill_perimeter_violations -Dfill_isolated_cells -Dsmooth_topo -Dround_shallow -Dstream_function -Dsf_9_point -Duse_netCDF -L/usr/lib -lnetcdf -L/usr/lib -ludunits -I/usr/include/ -I/usr/include/ -c' -asm /tmp/pgf90baaaasqgab.sm
PGF90/x86 Linux/x86-64 6.0-4: compilation successful

/usr/pgi/linux86-64/6.0/bin/pgsmart -o /tmp/pgf90caaaasqgab.s /tmp/pgf90baaaasqgab.sm

/usr/bin/as /tmp/pgf90caaaasqgab.s -I/usr/include/ -I/usr/include/ -o mpp.o
/tmp/pgf90caaaasqgab.s: Assembler messages:
/tmp/pgf90caaaasqgab.s:440: Error: junk at end of line, first unrecognized character is `:'
/tmp/pgf90caaaasqgab.s:2419: Error: junk at end of line, first unrecognized character is `:'
pgf90-Fatal-Nasm completed with exit code 1

Unlinking /tmp/pgf90aaaaasqgab.ilm
Unlinking /tmp/pgf90baaaasqgab.sm
Unlinking /tmp/pgf90caaaasqgab.s


So there looks like there is a problem when the file is converted
to assembly language.

When it time to link the *.o files, the output looks like:


=> linking ...
pgf90 addobc.o adv_vel.o atmos.o baroclinic.o barotropic.o bcest.o blkdta.o blmixi.o buoy_track.o calc_psgrad.o cavitating.o checks.o cobc.o cobc2.o congrad.o continuity.o convect.o convert.o datamod.o delsq.o denscoef.o diag_energy.o diag_gyre.o diag_ice_snap.o diag_ice_timeavg.o diag_initial.o diag_masks.o diag_merd_basin.o diag_mw_inside.o diag_mw_outside.o diag_nor1st.o diag_out_scalar.o diag_out_snap.o diag_out_timavg.o diag_out_xy.o diag_out_xyz.o diag_out_yz.o diag_ptraj.o diag_region.o diag_rhoterms.o diag_stab.o diag_termbal.o diag_vmix.o diag_xbt.o diffusion.o driver.o expl_freesurf.o fast_fir.o filfir.o filt.o filtr.o filuv.o findex.o fluxx.o fluxy.o forcing.o freedrift.o friccoeffgran.o gasbc.o getriver.o gosbc.ogranvisccoef.o grids.o heatfluxes.o hmixc.o ice.o impl_freesurf.o implq.o invtri.o iomngr.o isopyc.o kppmix.o libpatch.o loadmw.o mom.o mom3mpp.o mpp_domains.o mpp_io.o neptune.o nonconstdiff.o nowsubs.o odam.o par_get.o poisson.o ppmix.o r_time_filter.o restio.o rinum.o rotation.o sbcmod.o setatm.o setice.o setocn.o setriver.o setsff.o setvbc.o size_check.o smagnl.o state.o statekpp.o switch.o task_simulator.o tcmix.o thermodynamic.o timeinterp.o timer.o tmngr.o tmngr_mod.o topog.o tracer.o tracer_adv_flx.o unesco_density.o util.o uvsolve.o vmix1d.o vmixc.o xctdbc_mod.o xland.o xobc_mod.o xsponge_mod.o znowgrid.o -L/usr/lib/gcc-lib/x86_64-pc-linux-gnu/3.4.3 -v -L/usr/lib -lnetcdf -L/usr/lib -ludunits -o NowIce1

/usr/bin/ld /usr/lib64/crt1.o /usr/lib64/crti.o /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/crtbegin.o /usr/pgi/linux86-64/6.0/lib/f90main.o -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 addobc.o adv_vel.o atmos.o baroclinic.o barotropic.o bcest.o blkdta.o blmixi.o buoy_track.o calc_psgrad.o cavitating.o checks.o cobc.o cobc2.o congrad.o continuity.o convect.o convert.o datamod.o delsq.o denscoef.o diag_energy.o diag_gyre.o diag_ice_snap.o diag_ice_timeavg.o diag_initial.o diag_masks.o diag_merd_basin.o diag_mw_inside.o diag_mw_outside.o diag_nor1st.o diag_out_scalar.o diag_out_snap.o diag_out_timavg.o diag_out_xy.o diag_out_xyz.o diag_out_yz.o diag_ptraj.o diag_region.o diag_rhoterms.o diag_stab.o diag_termbal.o diag_vmix.o diag_xbt.o diffusion.o driver.o expl_freesurf.o fast_fir.o filfir.o filt.o filtr.o filuv.o findex.o fluxx.o fluxy.o forcing.o freedrift.o friccoeffgran.o gasbc.o getriver.o gosbc.o granvisccoef.o grids.o heatfluxes.o hmixc.o ice.o impl_freesurf.o implq.o invtri.o iomngr.o isopyc.o kppmix.o libpatch.o loadmw.o mom.o mom3mpp.o mpp_domains.o mpp_io.o neptune.o nonconstdiff.o nowsubs.o odam.o par_get.o poisson.o ppmix.o r_time_filter.o restio.o rinum.o rotation.o sbcmod.o setatm.o setice.o setocn.o setriver.o setsff.o setvbc.o size_check.o smagnl.o state.o statekpp.o switch.o task_simulator.o tcmix.o thermodynamic.o timeinterp.o timer.o tmngr.o tmngr_mod.o topog.o tracer.o tracer_adv_flx.o unesco_density.o util.o uvsolve.o vmix1d.o vmixc.o xctdbc_mod.o xland.o xobc_mod.o xsponge_mod.o znowgrid.o -o NowIce1 -L/usr/lib/gcc-lib/x86_64-pc-linux-gnu/3.4.3 -L/usr/lib -L/usr/lib -L/usr/pgi/linux86-64/6.0/lib -L/usr/lib64 -L/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3 -rpath /usr/pgi/linux86-64/6.0/lib -lnetcdf -ludunits -lpgf90 -lpgf90_rpm1 -lpgf902 -lpgf90rtl -lpgftnrtl -lc -lnspgc -lpgc -lm -lgcc -lc -lgcc /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/crtend.o /usr/lib64/crtn.o


followed by numerous error messages like:

driver.o(.text+0x49): In function `MAIN_':
: undefined reference to `mpp_mod_mpp_init_'
driver.o(.text+0x6c): In function `MAIN_':
: undefined reference to `mpp_mod_mpp_npes_'


These errors are because the file mpp.o is never created, and that
has something to do with the problem of the assembly file having
errors.

Have there been other problems of this type? I guessing that
there is a compile-time library that is not being read or read correctly,
since the assembly language errors seem to be the symptom. Or
maybe it is a more basic conversion error?
Back to top
View user's profile
mkcolg



Joined: 30 Jun 2004
Posts: 5815
Location: The Portland Group Inc.

PostPosted: Thu Jun 02, 2005 8:42 am    Post subject: Reply with quote

Hi t_arbetter,

This most likely a problem with our code generator. Compiling these two files with '-O0' instead of '-fast' should work around the issue. We'll investigate and should have a fix in a future release.

Thanks,
Mat
Back to top
View user's profile
t_arbetter



Joined: 01 Jun 2005
Posts: 2

PostPosted: Thu Jun 02, 2005 9:01 am    Post subject: successfully compiled with 0 optimization. Reply with quote

The code compiled successfully with the -O0 command.

Thanks for your quick reply!

-- t
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling All times are GMT - 7 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © phpBB Group