Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28455 Discussions

OPENMP INTEL FOTRAN RUN-TIME ERROR:forrtl: severe (40): recursive I/O operation, unit -1, file unknown

Zhang__Xueyan
Beginner
3,002 Views

Hi, I compiled a openmp program with intel fortran successfully, and this is my macros and Makefile:

macros

  1 .IGNORE:
  2 RM              =       rm -f
  3 COMPILER90=     ifort -openmp #-fbounds-check
  4 FREESOURCE=     -free #-ffree-form
  5 F90FLAGS  =     -c -I/home/2015051066/soft/netcdf/include
  6 MODFLAG =
  7 LDFLAGS =       -O3
  8 CPP     =       cpp
  9 CPPFLAGS        =        -P -traditional
 10 #F90FLAGS  =     -c -I/cm/shared/apps/netcdf/gcc/64/4.5.0/include
 11 #F90FLAGS  =     -c -I/cm/shared/uaapps/netcdf/fortran/gcc/4.4.4/include
 12 #F90FLAGS  =     -c -I/home/u4/niug/netcdf-fort-4.4.4/include
 13 RM = rm -f
 14 RM = rm -f
 15 RM = rm -f
 16 RM = rm -f
 17 RM = rm -f

Makefile

  1 # Makefile
  2 #
  3 #INCLUDES=
  4 .SUFFIXES:
  5 .SUFFIXES: .o .f
  6
  7 include ../macros
  8
  9 MAINOBJ1 = ../IO_code/Noah_driver.o
 10
 11 OBJS = \
 12         ../Noah_code/module_Noahlsm.o \
 13         ../Noah_code/module_Noahlsm_param_init.o \
 14         ../Noah_code/module_Noahlsm_utility.o \
 15         ../Noah_code/module_date_utilities.o \
 16         ../IO_code/module_Noah_NC_output.o \
 17         ../IO_code/module_Noahlsm_gridded_input.o
 18
 19 CMD = Noah
 20 all:    $(CMD)
 21
 22 Noah: $(OBJS) $(MAINOBJ1)
 23         @echo ""
 24         $(COMPILER90) -o $(@) $(OBJS) $(MAINOBJ1) -L/home/2015051066/soft/netcdf/lib -lnetcdff -lnetcdf
 25 #       $(COMPILER90) -o $(@) $(OBJS) $(MAINOBJ1) -L/cm/shared/apps/netcdf/gcc/64/4.5.0/lib -lnetcdff -lnetcdf
 26 #       $(COMPILER90) -o $(@) $(OBJS) $(MAINOBJ1) -L/cm/shared/uaapps/netcdf/fortran/gcc/4.4.4/lib -lnetcdff -lnetcdf
 27         @echo ""
 28
 29 # This command cleans up
 30
 31 clean:
 32         rm ../IO_code/*mod ../IO_code/*.o
 33         rm ../Noah_code/*mod ../Noah_code/*.o
 34         rm $(CMD)

 

When I run the model with the pbs script:

  1 #!/bin/sh -f
  2 #PBS -N test
  3 #PBS -m n
  4 #PBS -l mem=1gb
  5 #PBS -l nodes=1:ppn=28
  6 nprocs=`wc -l < $PBS_NODEFILE`
  7 cd $PBS_O_WORKDIR
  8 #date
  9 #mpirun -genv I_MPI_DEVICE ssm  -np $nprocs -hostfile $PBS_NODEFILE $PBS_O_WORKDIR/test.sh
 10 #cd /home/2014011989/noahmp/Run
 11 /usr/bin/time ./Noah >&out
 12 #date
 13

 

The error is:

  1  mdt, minute = 01010000
  2  INPUT LANDUSE = USGS
  3  LANDUSE TYPE = USGS FOUND          27  CATEGORIES
  4  INPUT SOIL TEXTURE CLASSIFICAION = STAS
  5  SOIL TEXTURE CLASSIFICATION = STAS FOUND          19  CATEGORIES
  6  successful initialize general model parameters
  7  ------------- successful reading surface data ------------------
  8           30
  9   0.3950000      0.4100000      0.4340000      0.4760000      0.4850000
 10   0.4390000      0.4040000      0.4640000      0.4650000      0.4060000
 11   0.4680000      0.4680000      0.3950000       1.000000      0.2000000
 12   0.4210000      0.4680000      0.2000000      0.3390000      0.0000000E+00
 13   0.0000000E+00  0.0000000E+00  0.0000000E+00  0.0000000E+00  0.0000000E+00
 14   0.0000000E+00  0.0000000E+00  0.0000000E+00  0.0000000E+00  0.0000000E+00
 15  fini=arbitrary initialization
 16  ------------- successful initialization ------------------
 17        1    1980       1       1       1       0       1
 18  -------------------------------------------
 19  READFORC: opening /home/2014011989/noahmp/Noah_data/forcings/1980/1980010100.nc
 20  The model is losing(-)/gaining(+) fake water
 21  ERRWAT =  -5.000397
 22  ix,iy,WA,END_WB,BEG_WB,PRCP*DT,ECAN*DT,EDIR*DT,ETRAN*DT,RUNSRF*DT,RUNSUB*DT
 23  The model is losing(-)/gaining(+) fake water
 24 forrtl: severe (40): recursive I/O operation, unit -1, file unknown
 25 �^H~[^@^@^@^@^@~@Y~W^@^@^@^@^@^@^@^@^@^@^@^@^@^@4.02user 2.11system 0:13.07elapsed 46%CPU (0avgtext+0avgdata 150056maxresiden    t)k
 26 22032inputs+0outputs (0major+51064minor)pagefaults 0swaps
~

 

Is the problem from my wrong script? How to solve it?

 

Thank you very much!

0 Kudos
21 Replies
Zhang__Xueyan
Beginner
303 Views

Thanks for all help!

0 Kudos
Reply