Next: 1.2 Documentation of MOLPRO Up: 1 MOLPRO developers' kit Previous: 1 MOLPRO developers' kit

1.1 Building test versions of MOLPRO

  1. Firstly ensure that the complete MOLPRO system has been built. If this has been done correctly, you should find the file Makefile in the directory develop. If the developers' kit has been unpacked after building, you may need to go into develop and type make. On some systems (e.g., SGI, Linux, DEC), it is possible to get much faster linking, together with smaller executables, in development mode through the use of shared libraries. To activate this possibility, you should additionally type make libmolpro.so in the develop directory.

  2. Create a fresh directory, and in that directory, make a symbolic link to Makefile in the develop directory of the installed MOLPRO source tree.

  3. In your directory, issue
    make basefiles
    
    to set up various development utility scripts. The original distribution directory appears symbolically linked to ./base.

  4. Copy in to your directory just those fortran files from the main distribution which you want to change. This can be conveniently and safely done using the script command
    make file1 file2 ...
    
    where file1 etc. are pathnames that can be fully qualified, relative to base, or relative to base/src/*/.

  5. In your directory, issuing
    make
    
    should build your version of the program, together with appropriate ancillary files, such that you can then run it by simply issuing
    molpro
    
    By default, files are compiled without optimization, and with debug enabled. To force compiler optimization, use
    make FFLAGS=-O
    
    To insert additional linking options, use
    make LFLAGS='<any additional options you like to be passed to ld>'
    

  6. If you wish to add or change any include files, you may create a sub-directory common and place them there; this will be scanned before the standard directory at compile time.

  7. To run under the control of a symbolic debugger, the raw executable molpro.exe can in normal circumstances be used instead of the wrapper program molpro. It is essential that those environment variables that molpro normally handles are explicitly set, but this can be conveniently achieved by issuing, for C shell,
    source ./cshrc
    
    or, for Bourne shell,
    . ./profile
    

  8. When you have finished your development work, you can clean up the development directory by issuing
    make veryclean
    
    This will remove all objects, executables and ancillary files, but will leave your fortran files intact!

This procedure can be duplicated as many times as necessary for different development projects. Each project can go on simultaneously in a different directory without interference.

The file molpro.rc controls the way in which the molpro command front end prepares for and loads the back end module molpro.exe. The make procedure will create a molpro.rc which is suitable for most purposes, but you can edit it to your needs. If molpro.rc is not changed from the default, make veryclean will destroy it; otherwise it is kept. Possible options to add/change include:

-d dir
to change the working directory
+s
to reinstate the mechanism by which old output files are saved
-W dir
to specify a directory where wavefunction (files 2 and 3) datasets are kept permanently.


Next: 1.2 Documentation of MOLPRO Up: 1 MOLPRO developers' kit Previous: 1 MOLPRO developers' kit

P.J. Knowles and H.-J. Werner
molpro-support@tc.bham.ac.uk
Jan 10, 2000