Compiling must be done with gmake (i.e. GNU make), not make. This goes for the Multipole Library and the user's programs that are linked to the library. Steps are: 1) Go to the home directory for the multipole library, t17-7 2) gmake ARCH=**** PAROS=seq In this, **** is a machine-dependent variable that selects the appropriate Makefile for the machine of interest. **** is pwr2 for an IBM SP, and is IRIX64 for a SGI. Many other possible values for **** exist. The way to find the possible choices is to go to the t17-7 directory and then cd to Make-common and then do a ls. There are many makefiles there that have the syntax Make.**** where **** is what ARCH should be set to in the above command. The extensions are hopefully recognizable as being applicable to the machine you are running on. Be warned that these makefiles may not always work on your machine. They have not been recently tested on all of the machines listed and may require some work on your part to determine how to alter them. In some cases some parts of the code that makes up the library may have to be rewritten if the compiler or the loader on your machine have special requirements or are unusually strict. This gmake command, if you have cd'd to the t17-7 directory, will recursively go into the directories and build the libraries for the **** architecture and the 'seq'-uential PAROS (other choices for PAROS are things like MPI and PVM). This should create mpmy_seq.o and libsw.a put them in Objfiles/pwr2. [ An alternate way to specify ARCH and PAROS is to set them as environment variables, for example in the user's .profile or .cshrc files. Make treats environment variables as if they were specified on the command line. So what one can do is put: export ARCH=**** export PAROS=seq in your .profile. Or if you're a [t]csh user, put: setenv ARCH **** setenv PAROS seq in your .cshrc. ] 3) After the library has been built for the proper ARCH and PAROS, then one has to run gmake for the user's programs, again specifying the correct ARCH and PAROS. They can either be specified in the user's Makefile or in the user's environment variables. [ Building everything will always be a two-step process. First you build the libraries (with ARCH and PAROS set). Then you build your application, linked against the libraries (again, with ARCH and PAROS set). The latter should be much more frequent than the former. That is, you only need to build the libraries when you change the contents of the libraries, but not if you just change your application. ] The Makefile that the user needs to create to build the executable file as well as those needed to make the multipole library differ from machine to machine. An example user's Makefile is provided in the src-bin directory that has the park.f source code in it. The compiler tweaks and vendor/machine-specific enhancements need to be figured out for each machine. One's local computer gurus can hopefully help figure out what changes need to be made to match the machine in question. The sample Makefiles in the src-bin and the Makefiles in ~/t17-7/Make-common are so baroque because of the variety of possible machine requirements. To see where to make any needed machine-specific changes, look in: $(TREEHOME)/Make-common/Make.pwr2 (for example) There's a series of if/else clauses that set various make variables according to the environment. Needed changes will probably be in the last clause (not CC==gcc and not ARCH==pwr2). Change the CC_SPECIFIC and-or OPTIMIZE variables to whatever magic the local gurus think is best. [ If after step 2 above, mpmy_seq.o is not created in Objfiles/pwr2, then one of three things happened: - it was compiled, but not copied. Look at the make output and find where mpmy_seq.o was created. Copy it manually. - it was compiled, not copied but deleted (Make sometimes does stuff like this). In that case, look at the make output and cut-and-paste the command that make used to create the file into a shell. Run the command. You should now have an mpmy_seq.o. Copy it to the destination. - make never bothered to compile it. This one is tougher. Try doing touch libmpmy/mpmy_seq.c and then running make again. Maybe there was a problem with file creation times. ] [ Just in case there is any remaining question about the process of building the multipole libraries and the user's files, it really is a two-step process. The following notes written by John Salmon make this clear: The way to think about it is: - if you modify the libraries, then run make in the library directory. - if you modify the application, then run make in the app directory. It really is a two-step process. In general, you don't expect make to go off and recompile /usr/lib/libc.a (or even /usr/local/gnu/libsomething.a) whenever you run it. You expect that to be updated by whoever "owns" the library whenever it's appropriate. On the other hand, it is fairly common for Makefiles to >>notice<< when libraries and include files change, and to do the "right thing". The Makefile I gave you doesn't even do that though. You could accomplish that by adding something like $(LIBDIR)/libsw.a to the dependency list for park. Then whenever libsw.a changes, it will force park to be relinked. To be even safer, you would do the same thing with the .h files that are incorporated during compilation. But you really want to identify them automatically -- which gets into a whole nightmare world of self-modifying Makefiles, obscure shell constructs and compiler flags. My advice: don't worry about it. ] [ If one uses make rather than gmake in building the user's application executable, then an error may be returned that says " ~/t17-7/Objfiles/pwr2/mpmy_seg.o cannot be found " This does not occur if you use gmake. Similar problems can occur if one uses make rather than gmake in building the multipole library. ] If one has had trouble in getting things to compile and link correctly and wants to try to make a whole new start: cd to t17-7 directory gmake clean this cleans out all the possibly inconsistent .o and .a files gmake ARCH=**** PAROS=seq This builds library again from scratch using the appropriate **** as explained at the top of this file. Then cd to directory with users Makefile, applications files, object files and executable file and get rid of object files so they will have to be created again: rm *.o gmake This builds application executable again from scratch