[ncl-install] Build Intel fortran program linking to gfortran built ncarg lib

Dave Allured - NOAA Affiliate dave.allured at noaa.gov
Tue May 7 15:18:02 MDT 2019


Dave R,

This would be best answered by NCARG support.  Given their delayed
response, I will offer my suggestions.

In the current NCL archive, there are no 6.5.0 binaries compiled for Intel
fortran.  You probably downloaded a version compiled for GNU/GCC/gfortran.
This would explain all the missing symbols using the Intel compiler, things
like '_gfortran_concat_string' and so on.  These symbols are in the
GCC/gfortran runtime systems which I speculate you do not have installed.

It may be possible to get a GCC/gfortran runtime system installed on your
system.  Then if you compile user programs with ifort, you might be able to
get an executable that uses mixed Intel and GNU runtime systems.  I might
be a bit superstitious, but I try to avoid mixed runtime systems when
possible.  This could easily lead to strange and obscure problems.
Testimonials to the robustness of mixed runtimes are conspicuously absent.
  ;-)

I recommend that you go ahead and build your own Intel-compiled version
from source, using the NCARG-only options as described in the on-line
install documentation.  Then you will get pure Intel user executables and
avoid possible mixed runtime issues.

I have compiled full NCL from source, many times without too much trouble,
most recently using Macports package manager which helps a lot.  NCARG only
should be quite a bit easier.  There would be far fewer dependencies.  You
may want to look into other package managers to simplify your build on RH6
Linux.

--Dave A.


On Fri, May 3, 2019 at 3:28 PM Reynolds, David C CTR (US) via ncl-install <
ncl-install at ucar.edu> wrote:

> We have a legacy program built with the Intel fortran that uses the NCARG
> library on a RH6 linus system. The legacy program is not going to be
> rewritten.
>
> The build that works uses the Intel 12 fortran compiler and a NCARG 6.1.2
> library built from source with the Intel compiler. Only the not
> OPenDAP-enabled NCARG library is needed, not the full NCL library.
>
> When trying to build the program with the precompiled  NCL Version 6.5.0
> binaries the program build returns many unsatisfied externals such as:
>
> ifort -c  xiv_ob_inr_p.f
>
> ifort -Bstatic -o ../bin/plotxy.exe arrows.o c_insty_ob.o c_insty_plt.o
>
> c_pr_obs_p.o c_jvarty.o color.o colort.o colram.o cshade.o dpd_cpu.o equiv.o
>
> fill.o flipk.o gbox.o ifill.o isolin.o leftjus.o ll_ij.o lnq2td.o
>
> jvarty_fun.o maps.o maskland.o maxmin.o nblank.o nomask.o ob_get_type.o
>
> p_lvl_find.o pl_innov.o prh2td.o plgrid.o plotlab.o plotob.o plotxy.o
>
> q_cpu.o qprntn2.o readob.o rhdist.o rinnov.o rotang.o rsd_ina_p.o rsort.o
>
> rstlen.o scale.o setup3.o setupg.o sfcplt.o shadad.o shadap.o shapre.o
>
> stmlin.o stnplot.o uv2df1.o uvgrid1.o vectors.o wbarb.o wtitle.o
>
> xiv_ob_rd_p.o xiv_ob_rd_s.o xiv_ob_ina_p.o xiv_ob_inr_p.o ../lib/libcoamps.a
>
> -L/site/opt/ncarg/ncl-6.5.0/lib -lncarg -lncarg_gks -lncarg_c
>
> /site/opt/ncarg/ncl-6.5.0/lib/libncarg.a(cpcldm.o): In function `cpcldm_':
>
> cpcldm.f:(.text+0x55f): undefined reference to `_gfortran_concat_string'
>
> cpcldm.f:(.text+0x58f): undefined reference to `_gfortran_concat_string'
>
> cpcldm.f:(.text+0x5b9): undefined reference to `_gfortran_concat_string'
>
> cpcldm.f:(.text+0x5e9): undefined reference to `_gfortran_concat_string'
>
> cpcldm.f:(.text+0x613): undefined reference to `_gfortran_concat_string'
>
> /site/opt/ncarg/ncl-6.5.0/lib/libncarg.a(cpcldm.o):cpcldm.f:(.text+0x643):
>
> more undefined references to `_gfortran_concat_string' follow
>
> /site/opt/ncarg/ncl-6.5.0/lib/libncarg.a(cpcldm.o): In function `cpcldm_':
>
> cpcldm.f:(.text+0x2129): undefined reference to `_gfortran_string_len_trim'
>
> /site/opt/ncarg/ncl-6.5.0/lib/libncarg.a(cpcldr.o): In function `cpcldr_':
>
> cpcldr.f:(.text+0x472): undefined reference to `_gfortran_concat_string'
>
> cpcldr.f:(.text+0x498): undefined reference to `_gfortran_concat_string'
>
> cpcldr.f:(.text+0x4be): undefined reference to `_gfortran_concat_string'
>
> cpcldr.f:(.text+0x4e4): undefined reference to `_gfortran_concat_string'
>
> cpcldr.f:(.text+0x50a): undefined reference to `_gfortran_concat_string'
>
> /site/opt/ncarg/ncl-6.5.0/lib/libncarg.a(cpcldr.o):cpcldr.f:(.text+0x530):
>
> more undefined references to `_gfortran_concat_string' follow
>
> The question is "is there an easy fix to this?"; such as a library specification
>
> in the makefile for the progran or will I need to build the NCARG library from
>
> source using our default Intel compilers?
>
>
>
> Any suggestions are welcomed.
>
>
> -- Dave
>
>
>
> -----------------------------
>
> Dave Reynolds
>
> HPC Software Engineer
>
> DeVine Consulting
>
> FNMOC / US Navy
>
> david.reynolds4.ctr at navy.mil
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-install/attachments/20190507/ffedc894/attachment.html>


More information about the ncl-install mailing list