Re: [netcdfgroup] nf90_netcdf4, nf90_mpiio, etc. names cannot be found

The same code compiles properly on other computers/clusters and on the same one if you use another compiler suite? Probably yes - otherwise you wouldn't offer it at sourceforge (http://cgpack.sourceforge.net/) :-) .

I don't have experience in building my own netcdf with MPI support (I am just using it). Maybe there is the problem.

Just one final idea: The netcdf library can be compiled with and without Fortran 2003 features (--disable-f03). The include directory of my personal netcdf installation and the include directory on our cluster contain files named netcdf4_f03.mod and netcdf_f03.mod. Yours does not. If you compile the code according to the Fortran 2003 or Fortran 2008 standards and the Intel netCDF library was compiled without Fortran2003 feature some problems might arise. But this is just an idea and I didn't experience it yet.

Cheers,
Daniel




Am 2017-05-04 18:54, schrieb Anton Shterenlikht:
From: Daniel Neumann <daniel.neumann@xxxxxxxxxxxxxxxxx>

Hi Anton,

Does the error arise on the first occurrence of a function or constant
of the netCDF library? If yes, it looks to me that the compiler doesn't
know about your netCDF library.

Which flags (include and library flags) do you use to include the netcdf
library? How does your compiler call look like?

It should be something like:

mpiifort -c
-I/cm/shared/libraries/intel_build/netcdf-4-intel-16.par/include -o
cgca_m2netcdf.o cgca_m2netcdf.f90

Daniel, thank you for taking the time.

Yes, this is essentially what I do.
I also use ifort -coarray switch.
This is the full output:

newblue1> mpiifort -coarray=distributed -c
-I/cm/shared/libraries/intel_build/netcdf-4-intel-16.par/include
cgca_m2netcdf.f90
cgca_m2netcdf.f90(157): error #6404: This name does not have a type,
and must have an explicit type.   [NF90_NETCDF4]
call check( nf90_create(fname, ior(nf90_netcdf4,nf90_mpiio), ncid, &
-----------------------------------^
cgca_m2netcdf.f90(157): error #6404: This name does not have a type,
and must have an explicit type.   [NF90_MPIIO]
call check( nf90_create(fname, ior(nf90_netcdf4,nf90_mpiio), ncid, &
------------------------------------------------^
cgca_m2netcdf.f90(157): warning #7319: This argument's data type is
incompatible with this intrinsic procedure; procedure assumed
EXTERNAL.   [IOR]
call check( nf90_create(fname, ior(nf90_netcdf4,nf90_mpiio), ncid, &
-----------------------------------^
cgca_m2netcdf.f90(157): error #6404: This name does not have a type,
and must have an explicit type.   [IOR]
call check( nf90_create(fname, ior(nf90_netcdf4,nf90_mpiio), ncid, &
-------------------------------^
cgca_m2netcdf.f90(158): error #6627: This is an actual argument
keyword name, and not a dummy argument name.   [COMM]
       comm=comm, info=MPI_INFO_NULL))
-------^
cgca_m2netcdf.f90(158): error #6627: This is an actual argument
keyword name, and not a dummy argument name.   [INFO]
       comm=comm, info=MPI_INFO_NULL))
------------------^
cgca_m2netcdf.f90(176): error #6404: This name does not have a type,
and must have an explicit type.   [NF90_DEF_VAR_FILL]
call check ( nf90_def_var_fill(ncid, varid, 1, 1) )
-------------^
cgca_m2netcdf.f90(184): error #6404: This name does not have a type,
and must have an explicit type.   [NF90_COLLECTIVE]
call check( nf90_var_par_access(ncid, varid, nf90_collective) )
---------------------------------------------^
cgca_m2netcdf.f90(184): error #6404: This name does not have a type,
and must have an explicit type.   [NF90_VAR_PAR_ACCESS]
call check( nf90_var_par_access(ncid, varid, nf90_collective) )
------------^
compilation aborted for cgca_m2netcdf.f90 (code 1)
newblue1>

Again, the include dir seems to contain the right files:

newblue1> ls -al /cm/shared/libraries/intel_build/netcdf-4-intel-16.par/include
total 680
drwxr-xr-x 2 root root   4096 Mar  8 15:07 .
drwxr-xr-x 6 root root   4096 Mar  8 14:45 ..
-rw-r--r-- 1 root root  58489 Mar  8 14:45 netcdf.h
-rw-r--r-- 1 root root  42609 Mar  8 15:07 netcdf.inc
-rw-r--r-- 1 root root 214523 Mar  8 15:07 netcdf.mod
-rw-r--r-- 1 root root   1180 Mar  8 14:45 netcdf_par.h
-rw-r--r-- 1 root root   1382 Mar  8 15:07 typesizes.mod
newblue1>

Thanks

Anton

--
Daniel Neumann

Leibniz Institute for Baltic Sea Research Warnemuende
Physical Oceanography and Instrumentation
Seestrasse 15
18119 Rostock
Germany

phone:  +49-381-5197-287
fax:    +49-381-5197-114 or 440
e-mail: daniel.neumann@xxxxxxxxxxxxxxxxx



  • 2017 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdfgroup archives: