Compiling problems:

Problems:

1) Makefile Problem: cpp not found
2) How to use Marc-André Hermanns modified Makefile/Package?
3) Problem to open include file 'common6.h' during compilation
4) Preprocessor Problem: Unwanted comments in preprocessed code

Solutions:

1) Makefile Problem: cpp not found On some Unix systems (new SuSE Linux 10.x, IBM Jump) the path to the C Pre-Processor (it is used to process the compiler directives in .F files) is not automatically found by the Makefile.

That leads to the necessity to put an extra rule in the Makefile such as:

.F.o :
$(CPPPATH) $(CPPFLAGS) $< > xxx.f
$(FC) $(FFLAGS) -c xxx.f -o $@

For IBM Jump one has to set

CPPPATH = /usr/ccs/lib/cpp

This works fine - BUT (!) the big problem - it is not compatible to the standard.
So once this is included the Makefile will NOT work anymore on the standard systems,
which did not require this extra lines in the Makefile.

Work Around: Use an extra file Makefile.jump. (R. Sp.)

Bug Fix: Unclear how to fix it.

2) How to use Marc-André Hermanns modified Makefile/Package? The source package of nbody6++ code, provided in the Files-section, has been modified in serveral aspects, including the Makefiles. The compilation of nbody6++ should work in three steps.

# tar xvzf nbody6_package.tar.gz
# cd src/
# cp Makefile.defs.<platform> Makefile.defs
# gmake

Currently three platform-specific definition Files exist

* Makefile.defs.linux: To be used on generic Linux Clusters with GCC
* Makefile.defs.ibm_linux: To be used on IBM Clusters running Linux
* Makefile.defs.ibm_aix: To be used on IBM AIX Clusters

(M.-A. H.)

3) Problem to open include file 'common6.h' during compilation Simply add the Compiler Flag -I. in the Makefile. This makes the Compiler search for include files in the current directory (A.E., Th. Br.)

4) Preprocessor Problem: Unwanted comments in preprocessed code Some versions of the preprocessor CPP are not able to preprocess Fortran 77 code correctly. There are unwanted comments like

# 1 "nbody6.F"
# 1 ""
# 1 ""
# 1 "nbody6.F"
PROGRAM NBODY6

Solution: Use the following flags cpp -P --traditional-cpp ... (Th. Br., A. E.)


Page Information

  • 10 months ago [history]
  • View page source
  • You're not logged in
  • No tags yet learn more

Wiki Information

Recent PBwiki Blog Posts