/afs/ovpit.indiana.edu/@syswhere
@sys this time evaluates to rs_aix42.
.f and rejects files
with suffix .f90. Here's a GNU make based
remedy to that problem:
OS = $(shell uname -s)
...
ifeq ($(OS), AIX)
%.o: %.f90
ln -s $< `basename $< .f90`.f
$(F90) $(F90_OPTS) -c $(F90_MODULES) `basename $< .f90`.f
rm `basename $< .f90`.f
else
%.o: %.f90
$(F90) $(F90_OPTS) -c $(F90_MODULES) $<
endif
-I switch, as is the case also under IRIX.
.o files generated by compiling modules
must be included in the linking step, even
if the modules contained declarations only. That
wasn't necessary under IRIX and Solaris.
I have generated an additional library in the HDF area,
which takes care of that. The library is
libhdf-modules.a and you should link it in when
generating HDF programs.
HDF_LIB = /afs/ovpit.indiana.edu/@sys/HDF/lib
HDF_MODULES = /afs/ovpit.indiana.edu/@sys/HDF/modules
OS = $(shell uname -s)
RM = /bin/rm
HDF_EXAMPLES = hdf-1 hdf-2 hdf-3 hdf-4 hdf-5 hdf-6 hdf-7 hdf-8
ifeq ($(OS), IRIX)
F90 = f90
F90_OPTS = -n32 -g
LIBS = -lmfhdf -ldf -ljpeg -lz -lm
F90_MODULES = -I$(HDF_MODULES)
else
ifeq ($(OS), SunOS)
F90 = f90
F90_OPTS = -g
LIBS = -lmfhdf -lnsl -ldf -ljpeg -lz -lm
F90_MODULES = -M$(HDF_MODULES)
else
ifeq ($(OS), AIX)
F90 = xlf90
F90_OPTS = -g
LIBS = -lhdf-modules -lmfhdf -ldf -ljpeg -lz -lm
F90_MODULES = -I$(HDF_MODULES)
else
F90_OPTS = -g
LIBS = -lmfhdf -ldf -ljpeg -lz -lm
F90_MODULES = -I$(HDF_MODULES)
endif
endif
endif
ifeq ($(OS), AIX)
%.o: %.f90
ln -s $< `basename $< .f90`.f
$(F90) $(F90_OPTS) -c $(F90_MODULES) `basename $< .f90`.f
rm `basename $< .f90`.f
else
%.o: %.f90
$(F90) $(F90_OPTS) -c $(F90_MODULES) $<
endif
%: %.o
$(F90) $(F90_OPTS) -o $@ $< -L$(HDF_LIB) $(LIBS)
all: $(HDF_EXAMPLES)
clean:
$(RM) -f *.o core
clobber: clean
$(RM) -f $(HDF_EXAMPLES)
gustav@sp20:../src 21:32:13 !547 $ make clobber /bin/rm -f *.o core /bin/rm -f hdf-1 hdf-2 hdf-3 hdf-4 hdf-5 hdf-6 hdf-7 hdf-8 gustav@sp20:../src 21:32:18 !548 $ make hdf-1 ln -s hdf-1.f90 `basename hdf-1.f90 .f90`.f xlf90 -g -c -I/afs/ovpit.indiana.edu/@sys/HDF/modules \ `basename hdf-1.f90 .f90`.f ** create_sds === End of Compilation 1 === 1501-510 Compilation successful for file hdf-1.f. mv: 0653-404 hdf-1.o: Unable to duplicate owner and mode after move. rm `basename hdf-1.f90 .f90`.f xlf90 -g -o hdf-1 hdf-1.o -L/afs/ovpit.indiana.edu/@sys/HDF/lib \ -lhdf-modules -lmfhdf -ldf -ljpeg -lz -lm rm hdf-1.o gustav@sp20:../src 21:32:24 !549 $The message about Unable to duplicate
$HOME or your AFS directory
from production runs. Use local scratch space in
/scrwhich is writable to everybody. Transfer final results only to your NFS or AFS directory.
/scr is local to each node,
and so cannot be used for parallel jobs transparently.
You must
write on it explicitly from an MPI program.
$ fs setacl . -acl system:anyuser rlidwwhile in that directory. To protect the directory from prying eyes of unauthorised users you can always close it off with the command:
$ fs setacl . -acl system:anyuser noneafter the run has finished, or you can bury it deeply inside your AFS directory tree, and close directories above it.
You should also check that all nodes specified
in your host.list file run AFS. Sometimes
they don't and that may result in run-time errors.