Opened 18 years ago
Closed 18 years ago
#50 closed bug (Fixed)
NetCDF f90 problems on Cray T3E
Reported by: | m.hadfield | Owned by: | arango |
---|---|---|---|
Priority: | major | Milestone: | Parallel Input/Output |
Component: | Parallelism | Version: | 3.1 |
Keywords: | Cc: |
Description
The recent switch to using the netCDF f90 interface has caused a few minor problems, which I am working through. On the Cray T3E, the make command fails with
cp -f /home/kupe/hadfield/local/include/netcdf.mod Build cp: cannot stat `/home/kupe/hadfield/local/include/netcdf.mod': No such file or directory
This problem arises because the Cray T3E compiler does not (by default) use .mod files. Instead (I think) it stores the module-interface data in the library file, libnetcdf.a. So there is no netcdf.mod file to copy. There may be other compilers that do the same thing.
By the way, it shouldn't be necessary to copy this file, should it? It should be possible to access the file from its installed location.
More later...
Attachments (1)
Change History (5)
comment:1 by , 18 years ago
Milestone: | Release ROMS/TOMS 3.0 → Parallel Input/Output |
---|
...OK, I've pretty much sorted it out.
First, the Cray T3E compiler can be directed to use .mod files with a command-line switch ("-e m") and this switch is already incorporated into FFLAGS in Compilers/UNICOS-sn-f90.mk, so my diagnosis of the problem was a little off the mark.
The primary problem was that the netCDF f90 interface had never been built on our machine, owing to the T3E's peculiar implementation of floating-point data types (REAL and DOUBLE both have 8 bytes). I managed to get it built with a bit of ad hoc editing of the netCDF source.
This leaves the problem that .mod files on the Cray have upper-case names, NETCDF.mod and TYPESIZES.mod. I have worked around this by modifying makefile so that it tests for the existence of netcdf.mod, NETCDF.mod, typesizes.mod and TYPESIZES.mod in $NETCDF_INCDIR and copies over the ones it finds. I will attach the modified makefile (once I work out how). There may well be a better solution, eg define symbols
NETCDF_MODNAME := netcdf.mod TYPESIZES_MODNAME := typesizes.mod
and then override these in the platform-dependent makefile as necessary.
Hernan assures me that copying the netCDF .mod files to the scratch directory is the best way of making them available to the compiler. OK, but another thought: wouldn't it be more elegant and "make-like" to specify them as dependencies and then have a rule to make them by copying them over?