>Date: Fri, 22 Jan 1999 14:03:57 -0600 (CST) >To: NCAR Mesouser >Subject: Make with MPP > >I'm porting some code changes from mm5v2-5 to mm5v2-11, and included in >the changes are additions to the existing makefiles along with new source >code directories. All of these changes work in v2-5. However, the MPP >version has a unique method of building the mm5 executable and I haven't >been able to get it to recognize the changes I've make to the various >makefiles or the new source code directories. > >Would you please describe the steps necessary to build the MPP version >when adding new subroutines, changing the makefiles, etc. For example, in >solve3.F I've added a call to subroutine mrfpbl_bats, and this code >resides in a unique directory (mm5v2-11/physics/pbl_sfc/hbats/) with its >own makefile. The changes I made to compile this code in v2-5 do not work >for the MPP version of v2-11. At the end of compilation the additional >subroutines are listed as undefined symbols. > Wei Wang forwarded your message to me. This is a good question, and I'm in the process of writing the documentation that should make this a little bit easier to figure out. But in the meantime, I'll try to give you a roadmap through what's going on. Here's what happens what the code is built using "make mpp" for the first time or after a "make uninstall" . A new directory named MPP/build is created and then populated with symbolic links to every .F and .c file in the code (perhaps some others too). The script that does this is MPP/Makelinks . You don't have to call it or anything, it just does this the first time make mpp is called in a new install or after an uninstall. If you've put a new .F file anywhere in the directory subtree underneath 'physics' this script will find it and set up a link in MPP/build. So the first thing I'd suggest would be to try "make uninstall" before you do another "make mpp". Then look in MPP/build; you should see a link to your new source file. You only need to do this once -- not every time you build the code. Then go and edit the file: MPP/mpp_objects_all and add mrfpbl_bats.o (or whatever your new source file is named) to the end of the BASE_OBJ list. After you have done this, type "make mpp" and it should try to compile your new file and link it it. Caveat -- I'm not sure what your special Makefile has in it, but it won't be used by the MPP make mechanism. That uses MPP/RSL/Makefile.RSL. If you aren't doing anything special, it should just work. If you are, we may have to talk further about how the thread your make rules and options into the existing MPP build mechanism.