ARWpost with Mac OS X 10.7 Lion + gfrotran

Discussions related to the use of ARWPost

ARWpost with Mac OS X 10.7 Lion + gfrotran

Postby tsubota » Fri Mar 15, 2013 6:01 pm

Dear All,

I am using WRF on MacOSX 10.7. Now I would like to use the ARWpost with gfortran on my Mac.
Since configure did not support gfortran and gcc, I edited configure.arwp based on the following site.

viewtopic.php?f=5&t=3667

However I could not compile it. I have attached my configure.arwp
I got following error message below. Please let me have any suggestion.

--- start of error log ---
dyn-160-39-2-123:ARWpost tsubota$ ./compile

**** Compiling ARWpost ****
gfortran -ffree-form -O -fconvert=big-endian -frecord-marker=4
-Wl,-stack_size,10000000,-stack_addr,0xc0000000 -o ARWpost.exe
module_model_basics.o constants_module.o gridinfo_module.o ARWpost.o
input_module.o output_module.o module_map_utils.o
misc_definitions_module.o module_date_pack.o module_debug.o
process_domain_module.o module_get_file_names.o module_interp.o
module_basic_arrays.o module_diagnostics.o module_arrays.o
module_pressure.o module_calc_height.o module_calc_pressure.o
module_calc_theta.o module_calc_tk.o module_calc_tc.o module_calc_td.o
module_calc_td2.o module_calc_rh.o module_calc_rh2.o
module_calc_uvmet.o module_calc_slp.o module_calc_dbz.o
module_calc_cape.o module_calc_wdir.o module_calc_wspd.o
module_calc_clfr.o \
-L/Users/tsubota/wrf/COMPILER_gfortran/netcdf-install/lib
-I/Users/tsubota/wrf/COMPILER_gfortran/netcdf-install/include
-lnetcdf
Undefined symbols for architecture x86_64:
"_ncvgt_", referenced from:
___input_module_MOD_read_next_field in input_module.o
___module_interp_MOD_get_keep_array in module_interp.o
___module_interp_MOD_get_interp_array in module_interp.o
___module_interp_MOD_get_interp_info in module_interp.o
"_nf_close_", referenced from:
___input_module_MOD_input_close in input_module.o
"_nf_get_att_int_", referenced from:
___input_module_MOD_read_global_attrs in input_module.o
"_nf_get_att_real_", referenced from:
___input_module_MOD_read_global_attrs in input_module.o
"_nf_get_att_text_", referenced from:
___input_module_MOD_read_global_attrs in input_module.o
___input_module_MOD_read_next_field in input_module.o
"_nf_get_vara_text_", referenced from:
___input_module_MOD_arw_get_next_time in input_module.o
"_nf_inq_", referenced from:
___input_module_MOD_input_init in input_module.o
"_nf_inq_att_", referenced from:
___input_module_MOD_read_global_attrs in input_module.o
"_nf_inq_attname_", referenced from:
___input_module_MOD_read_global_attrs in input_module.o
"_nf_inq_dim_", referenced from:
___input_module_MOD_input_init in input_module.o
"_nf_inq_var_", referenced from:
___input_module_MOD_arw_get_next_time in input_module.o
___input_module_MOD_read_next_field in input_module.o
___module_interp_MOD_get_keep_array in module_interp.o
___module_interp_MOD_get_interp_array in module_interp.o
___module_interp_MOD_get_interp_info in module_interp.o
"_nf_inq_varid_", referenced from:
___input_module_MOD_arw_get_next_time in input_module.o
___module_interp_MOD_get_keep_array in module_interp.o
___module_interp_MOD_get_interp_array in module_interp.o
___module_interp_MOD_get_interp_info in module_interp.o
"_nf_open_", referenced from:
___input_module_MOD_input_init in input_module.o
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status
make: [ARWpost.exe] Error 1 (ignored)
dyn-160-39-2-123:ARWpost tsubota$
--- end of error log ---
--- start of configure. arwp ---
# configure.arwp
#
# This file was automatically generated by the configure script in the
# top level directory. You may make changes to the settings in this
# file but be aware they will be overwritten each time you run configure.
# Ordinarily, it is necessary to run configure once, when the code is
# first installed.
#
# To permanently change options, change the settings for your platform
# in the file arch/configure.defaults, the preamble, and the postamble -
# then rerun configure.
#

.SUFFIXES: .F90 .f90 .F .f .c .o

SHELL = /bin/sh

# Listing of options that are usually independent of machine type.
# When necessary, these are over-ridden by each architecture.

ARFLAGS =

PERL = perl

RANLIB = echo

#### Architecture specific settings ####

# Settings for Darwin, gfortran compiler
#
NETCFD = /Users/tsubota/wrf/COMPILER_gfortran/netcdf-install
FC = gfortran
FFLAGS = -ffree-form -O -fconvert=big-endian -frecord-marker=4
F77FLAGS = -ffree-form -O -fconvert=big-endian -frecord-marker=4
FNGFLAGS = $(FFLAGS)
LDFLAGS = -Wl,-stack_size,10000000,-stack_addr,0xc0000000
CC = gcc
CFLAGS =
CPP = /opt/local/bin/CPP -C -P -traditional
CPPFLAGS = -D_UNDERSCORE -DBYTESWAP -DIO_NETCDF -DBIT32 -DMACOS -DNO_SIGNAL
RANLIB =

###########################################################
#
# Macros, these should be generic for all machines

LN = ln -sf
MAKE = make -i -r
RM = /bin/rm -f
CP = /bin/cp
AR = ar ru


.IGNORE:
.SUFFIXES: .c .f90 .F90 .f .F .o

# There is probably no reason to modify these rules

.c.o:
$(RM) $@
$(CC) $(CPPFLAGS) $(CFLAGS) -c $<

.f90.o:
$(RM) $@ $*.mod
$(CP) $< $*.f
$(FC) $(FFLAGS) -I${NETCDF}/include -c $*.f
$(RM) $*.f

.F90.o:
$(RM) $@ $*.mod
$(CPP) $(CPPFLAGS) $(FDEFS) $< > $*.f
$(FC) $(FFLAGS) -I${NETCDF}/include -c $*.f
$(RM) $*.f
--- end of configure.arwp ---
tsubota
 
Posts: 10
Joined: Wed Dec 12, 2012 6:25 pm

Re: ARWpost with Mac OS X 10.7 Lion + gfrotran

Postby Udo » Fri Jun 13, 2014 4:58 pm

Hi, I am having the same problem. Have you solved it???

Best!
Udo
 
Posts: 3
Joined: Sun Jun 08, 2014 10:43 am

Re: ARWpost with Mac OS X 10.7 Lion + gfrotran

Postby Udo » Fri Jun 13, 2014 5:28 pm

Hi,

ARWpost.exe was created after I added -lnetcdff in the src/Makefile.

So it will look like:

ARWpost.exe: $(OBJS)
$(FC) $(FFLAGS) $(LDFLAGS) -o $@ $(OBJS) \
-L$(NETCDF)/lib -I$(NETCDF)/include -lnetcdf -lnetcdff

Cheers!
Udo
 
Posts: 3
Joined: Sun Jun 08, 2014 10:43 am


Return to ARWPost

Who is online

Users browsing this forum: No registered users and 1 guest

cron