Scheduled Downtime
On Tuesday 24 October 2023 @ 5pm MT the forums will be in read only mode in preparation for the downtime. On Wednesday 25 October 2023 @ 5am MT, this website will be down for maintenance and expected to return online later in the morning.
Normal Operations
The forums are back online with normal operations. If you notice any issues or errors related to the forums, please reach out to help@ucar.edu

Port machine to Ubuntu error

aatreyee_iirs

Aatreyee Nath
Member
I ran nm libpnetcdf.a and the output of that command is attached herewith. I could not quite understand what the output meant, but I could find some of the listed symbols except for the following,
`gptlget_memusage'
`gptlprint_memusage'
`shr_reprosumx86_fix_end'
`shr_reprosumx86_fix_start'
'gptlfinalize'
'gptldisable'
'gptlenable'
'gptlstartstop_vals'
`gptlstop'
`gptlstart'
`gptlpr_query_write'
`gptlpr_set_append'
`gptlpr_summary_file'
`gptlpr_file'
`gptlpr_set_write'
`gptlstamp'
`gptldisable'
`gptlevent_name_to_code'
`gptlenable'
`gptlevent_name_to_code'
`gptlsetutr'
`gptlsetoption'
`gptlinitialize'
`gptlsetoption'

While building pnetcdf, I did not come across any errors and the tests were successful. Could it be an issue with the version of the libraries? I am using the following (GCC and gfortran 9.4.0)
zlib-1.2.13
hdf5-1.10.5
netcdf-c-4.9.0
netcdf-fortran-4.6.0
mpich-3.3.1
pnetcdf-1.12.3
LAPACK and BLAS 3.11

Thank you
 

Attachments

  • pnetcdf.txt
    479.7 KB · Views: 1

jedwards

CSEG and Liaisons
Staff member
Using this command -

mpif90 -o /home/ubuntuvm/projects/cesm/scratch/testrun2/bld/cesm.exe cime_comp_mod.o cime_driver.o component_mod.o component_type_mod.o cplcomp_exchange_mod.o map_glc2lnd_mod.o map_lnd2glc_mod.o map_lnd2rof_irrig_mod.o mrg_mod.o prep_aoflux_mod.o prep_atm_mod.o prep_glc_mod.o prep_ice_mod.o prep_lnd_mod.o prep_ocn_mod.o prep_rof_mod.o prep_wav_mod.o seq_diag_mct.o seq_domain_mct.o seq_flux_mct.o seq_frac_mct.o seq_hist_mod.o seq_io_mod.o seq_map_mod.o seq_map_type_mod.o seq_rest_mod.o t_driver_timers_mod.o -L/home/ubuntuvm/projects/cesm/scratch/testrun2/bld/lib/ -latm -L/home/ubuntuvm/projects/cesm/scratch/testrun2/bld/lib/ -lice -L/home/ubuntuvm/projects/cesm/scratch/testrun2/bld/lib/ -llnd -L/home/ubuntuvm/projects/cesm/scratch/testrun2/bld/lib/ -locn -L/home/ubuntuvm/projects/cesm/scratch/testrun2/bld/lib/ -lrof -L/home/ubuntuvm/projects/cesm/scratch/testrun2/bld/lib/ -lglc -L/home/ubuntuvm/projects/cesm/scratch/testrun2/bld/lib/ -lwav -L/home/ubuntuvm/projects/cesm/scratch/testrun2/bld/lib/ -lesp -L../../gnu/mpich/nodebug/nothreads/mct/noesmf/c1a1l1i1o1r1g1w1e1/lib -lcsm_share -L../../gnu/mpich/nodebug/nothreads/lib -lpio -lgptl -lmct -lmpeu -L/home/ubuntuvm/CESM_Library -lnetcdff -L/home/ubuntuvm/CESM_Library -lnetcdf -lm -lnetcdf -lhdf5_hl -lhdf5 -lpnetcdf -ldl -lm -lz -Wl,-rpath -Wl,/home/ubuntuvm/CESM_Library -L/home/ubuntuvm/CESM_Library -lpnetcdf -L/usr/local/lib -llapack -L/usr/local/lib -lblas -L/home/ubuntuvm/CESM/CESM_Library/lib -lpnetcdf -L/home/ubuntuvm/CESM_Library/lib


rearrange the location of the -lpnetcdf until you don't see the nfmpi_ commands in the link error message any longer. Once you have that figured out move on to the timing library (gptl) I don't understand why your system is being so particular about library order - if there is a system admin you can consult on your system you should ask.
 

aatreyee_iirs

Aatreyee Nath
Member
I have another doubt regarding the order of the libraries.
I built the libraries in the order>>>> Pnetcdf, HDF5, Netcdf-C and then Netcdf-Fortran.
So my doubt is, if library A depends on library B, which one should be linked first?
 

jedwards

CSEG and Liaisons
Staff member
This is not a problem we have with modern compilers and linkers, I don't really understand why you are seeing it, but:
The dependent library should come on the left, and the library which provides said dependency should come on the right.
 
Top