[ncl-install] question about ncargf90

Kevin Hallock hallock at ucar.edu
Fri Jul 26 11:09:59 MDT 2019


Hi Jerry,

The “ncargf90” script has the Fortran compiler used to build NCL hardcoded into it. Unfortunately, the $FC (Fortran Compiler) environment variable used by the conda build system includes the full path to the compiler from the build environment, and as you discovered this path does not exist on your system.

A workaround that you can use instead is to edit line 26 of the /root/.conda/envs/ncl_stable/bin/ncargf90 script to be just:
set fortran  = "gfortran"

which will cause ncargf90 to use the first “gfortran” program it can find in your $PATH environment variable.

If you want to use the same compiler that NCL was built with (“x86_64-conda_cos6-linux-gnu-gfortran”), you can install the gfortran package on conda:
conda install -n ncl_stable -c conda-forge gfortran_linux-64    # or gfortran_osx-64 on Mac

and then edit line 26 of the ncargf90 script to be:
set fortran  = "/root/.conda/envs/ncl_stable/bin/x86_64-conda_cos6-linux-gnu-gfortran"

I hope this helps,
Kevin

> On Jul 26, 2019, at 5:49 AM, pepe0254--- via ncl-install <ncl-install at ucar.edu> wrote:
> 
> Hi:
>     I want to use the ncargf90 command. but it always shows that :
>     /home/conda/feedstock_root/build_artifacts/ncl_1560882755492/_build_env/bin/x86_64-conda_cos6-linux-gnu-gfortran -fPIC -fno-second-underscore -fno-range-check -fopenmp -O -L/root/.conda/envs/ncl_stable/lib -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,--disable-new-dtags -Wl,--gc-sections -Wl,-rpath,/root/.conda/envs/ncl_stable/lib -Wl,-rpath-link,/root/.conda/envs/ncl_stable/lib -L/root/.conda/envs/ncl_stable/lib -V -traceback -xHost -O2 -fp-model precise -ftz -align array64byte -convert big_endian -assume byterecl -warn nogeneral -diag-disable 10212 -o hycomnavo hycomnavo.o mod_plot.o mod_xc.o mod_za.o wtime.o arrow1.o bigrid.o bigrd1.o blkin.o bord.o colbar.o colors.o conrec.o contur.o extrct.o filtr1.o fram.o fordate.o getdat.o getdepth.o grdtrns.o horplt.o indxi.o indxj.o legend1.o poisnd.o prtmsk.o psmoo.o sbmerg.o xsecij.o ssort.o zebra.o tracks.o zh.o getdat_nc.o -L/opt/netcdfc/lib -L/opt/netcdff/lib -lnetcdf -lnetcdff libnetcdf.a opngks_psp.o -L/root/.conda/envs/ncl_stable/lib -L/usr/X11R6/lib64 -lncarg -lncarg_gks -lncarg_c -lX11 -lXext -lcairo -lXrender -lfontconfig -lpixman-1 -lfreetype -lexpat -lpng -lz -lbz2
> /home/conda/feedstock_root/build_artifacts/ncl_1560882755492/_build_env/bin/x86_64-conda_cos6-linux-gnu-gfortran: Command not found. (The path shown here does not exist, it is wired)
>     the system is centos 7 x64, ncl version is 6.6.2 installed with 'conda', I also add the $NCARG_ROOT to the 'path'. I can run the command of NCL such as ncl_convert2nc successfully. could you give me some suggestions? Thanks in advance.
> 
>     ps: I install the NCL using the command 'conda'. I think NCL compiled by gfortran. I try to use ncargf90 to compile the fortran programs while with a netcdf library compiled with intel fortran/c. I think maybe it may be caused by it, but I am not sure.
> 
> Best Regards
> Jerry.P
> 
> pepe0254 at colorado.edu <mailto:pepe0254 at colorado.edu>_______________________________________________
> ncl-install mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-install <http://mailman.ucar.edu/mailman/listinfo/ncl-install>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-install/attachments/20190726/14087eb2/attachment-0001.html>


More information about the ncl-install mailing list