Thank you for your detailed response.
Unfortunately, I was unable to compile HYSPLIT using the INTEL compiler following the steps you suggested. I do not have IFORT 17.0.4 available to me - we have ICC/IFORT version 17.0.1 (20161005) installed on Cheyenne. I am not sure if there are version differences? However, I am unclear about your second suggestion - I did not see CC specified in data2arl/narr2arl/Makefile or any of the other Makefile scripts. I only see CFLAGS = $(INTL) and FC = ifort. Should FC = icc instead of ifort? I left CFLAGS and FC unchanged ($(INTL), ifort), and added CC = icc. Upon applying these changes and recompiling, I still received a similar error. Compile.log in the trunk folder shows:
Build date: Thu May 30 14:22:43 MDT 2019
========================================
***/glade/u/home/molina/hysplit/trunk/library/fcsubs
checking for Fortran 77 compiler default output... a.out
checking whether the Fortran 77 compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU Fortran 77 compiler... no
checking whether ifort accepts -g... yes
checking how to get verbose linking output from ifort... -v
checking for Fortran 77 libraries... -L/glade/u/apps/opt/intel/2017u1/compilers_and_libraries/linux/lib/intel64_lin -L/glade/u/apps/ch/os/usr/lib64 -L/glade/u/apps/ch/os/lib64 -L/glade/u/apps/ch/os/usr/lib -L/glade/u/apps/ch/opt/netcdf/4.6.1/intel/17.0.1/lib -L/glade/u/apps/ch/os/lib -lnetcdff -lnetcdf -lhdf5hl_fortran -lhdf5_hl -lhdf5_fortran -lhdf5 -lsz -lz -lm -ldl -lrt -ldl" -L/glade/u/apps/ch/opt/mpt/2.19/opt/hpe/hpc/mpt/mpt-2.19/lib -L/gpfs/u/apps/opt/intel/2017u1/compilers_and_libraries_2017.1.132/linux/compiler/lib/intel64_lin -L/usr/lib64/gcc/x86_64-suse-linux/4.8/ -L/usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../lib64 -L/usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../lib64/ -L/lib/../lib64 -L/lib/../lib64/ -L/usr/lib/../lib64 -L/usr/lib/../lib64/ -L/glade/u/apps/ch/opt/mpt/2.19/opt/hpe/hpc/mpt/mpt-2.19/lib/ -L/usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/lib/ -L/usr/lib64/gcc/x86_64-suse-linux/4.8/../../../ -L/lib64 -L/lib/ -L/usr/lib64 -L/usr/lib -limf -lifport -lifcoremt -lsvml -lipgo -lirc -lpthread -lgcc_s -lirc_s
checking for gcc... icc
checking whether we are using the GNU C compiler... yes
checking whether icc accepts -g... yes
checking for icc option to accept ANSI C... none needed
checking for dummy main to link with Fortran 77 libraries... unknown
configure: error: linking to Fortran libraries from C fails
make: *** No rule to make target 'install'. Stop.
Why does it say we are using the GNU C compiler — is that correct for intel?
There is now a {LOG} file in the FCSUBS folder, which I did not see before. Its contents show:
configure: WARNING: you should use --build, --host, --target
configure: error: linking to Fortran libraries from C fails
Errors in the config.log file in the FCSUBS folder reveal a number of errors associated with conftest and confdefs files, such as:
conftest.F(3): error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: => = . [ % ( :
choke me
^
compilation aborted for conftest.F (code 1)
configure:1466: $? = 1
configure: failed program was:
program main
#ifndef __GNUC__
choke me
#endif
configure:2395: icc -c -g -O2 conftest.c >&5
conftest.c(2): error: identifier "choke" is undefined
choke me
^
conftest.c(3): error: expected a ";"
I have attached the complete config.log (from FCSUBS) for your reference.
I decided to try compiling with GNU again given the comment in the compile.log file and applied the line ./configure F77=gfortran CC=gcc 1>>${LOG} 2>>${LOG} to the compile.sh file and added CFLAGS = $(GFOR), FC = gfortran, and CC = gcc to all relevant Makefiles. This worked. I attached a step-by-step set of instructions. Why did this work with GNU but not INTEL?
In regards to compiling with MPI, I have a question regarding the steps provided in the online instructions (
https://ready.arl.noaa.gov/documents/Tu ... _unix.html). The instructions say to remove the comma from the two -DENS -DMPI lines, but I only see one line with those two variables. Is it referring to these two lines:
Code: Select all
hycm_ens : $(SRC)/hymodelc.F
$(MPI) -o $@ $(PREP)-DENS, -DMPI $(CFLAGS) $(SRC)/hymodelc.F $(MLIB) -L$(LIB) -lhysplit
hycm_cb4 : $(SRC)/hymodelc.F
$(MPI) -o $@ $(PREP)-DCB4, -DMPI $(CFLAGS) $(SRC)/hymodelc.F $(MLIB) -L$(LIB) -lhysplit
Also, should I be removing this comma only if I am compiling with PGF90? Or does this apply for both GNU and INTEL?