The following are instructions on how to compile private versions of SNOMAN files (the .for files in the $SNO_CODE directory) against the standard version of SNOMAN (in /local/dev/snoman, for example). 1) Make sure you are using gcc 2.96. 2) Make sure you have sourced the appropriate setup file (giving the desired SNO_TOOLS and SNO_CODE environment variables). For example: source /home/dwaller/bin/sno_setup_dev.csh 3) Make sure you have sourced SNOMAN's local host environment variables: source $SNO_TOOLS/get_lhost_info.scr 4) Put the modified flies into a single directory. This directory will also contain the new SNOMAN executable. "cd" to that directory. 5) Compile your files as follows: $SNO_TOOLS/compile.scr -I$SNO_CODE *.for or $SNO_TOOLS/compile.scr -I$SNO_CODE a.for b.for c.for... 6) Assuming they compiled correctly, you can link their resultant object files (the .o files that have appeared) against the standard SNOMAN to create a private executable (say, "my_snoman.exe"): $SNO_TOOLS/link_snolib.scr "*.o" my_snoman.exe or $SNO_TOOLS/link_snolib.scr "a.o b.o c.o..." my_snoman.exe NOTE ---- If you change an include file (the .inc files in the $SNO_CODE directory), then you have to jump through a couple of hoops. First hoop (easy): put the modified include file into the directory where you are compiling. You do not have to compile the include file; it just needs to be in the same directory when you are compiling the dependent source (.for) file. The compile script looks for include files in the "." directory first. Second hoop (less easy): find every other source file that depends on the modified include file, and put them into your directory. You can find them like this: grep -i .inc $SNO_CODE/*.for You have to compile all these as well, so that they know about your changes to the include file. Then you link all the object files, from your modified source files and from all these other source files, together. EXAMPLE ------- I want to change mcg_set_position.for to create a new position type; this requires changing id_pos_types.inc and char_id_pos_types.for as well. I follow instructions (1)-(3). Following (4), I create a new directory, say "mysnoman", and "cd" to it: cd mysnoman/ I copy the files I want to modify there: cp $SNO_CODE/mcg_set_position.for . cp $SNO_CODE/char_id_pos_types.for . cp $SNO_CODE/id_pos_types.inc . Then I modify them. Following (5), I compile the modified source files to make sure my changes are okay: $SNO_TOOLS/compile.scr -I$SNO_CODE mcg_set_position.for $SNO_TOOLS/compile.scr -I$SNO_CODE char_id_pos_types.for So far, so good. Since I changed an include file, I'll have to recompile all the files that depend on them. So: grep -i id_pos_types.inc $SNO_CODE/*.for This gives: .../code/char_id_pos_types.for: include 'id_pos_types.inc' .../code/ingenr.for: INCLUDE 'id_pos_types.inc' .../code/mcg_particle_links.for: include 'id_pos_types.inc' .../code/mcg_print_request.for: include 'id_pos_types.inc' .../code/mcg_set_position.for: INCLUDE 'id_pos_types.inc' There are three other files I have to recompile, even though I did not change them. I copy these files to my directory: cp $SNO_CODE/ingenr.for . cp $SNO_CODE/mcg_particle_links.for . cp $SNO_CODE/mcg_print_request.for . I can now recompile so they use my modified id_pos_types.inc: $SNO_TOOLS/compile.scr -I$SNO_CODE ingenr.for mcg_particle_links.for mcg_print_request.for Finally, as per (6), I link everything to get my new executable: $SNO_TOOLS/link_snolib.scr "*.o" my_snoman.exe I can now run "my_snoman.exe" in place of "snoman.exe". =========================================== For clarifications, help, etc., see Ranpal.