Installation of the program package


McPhase  home page:
    http://www.mcphase.de

---------------------------------------------------------------------
I WINDOWS
---------------------------------------------------------------------

the windows version of McPhase provides all calculation programs
however less graphic tools. 

Preriquisites:
- for  running McPhase, McDisp
    Windows 2000, XP, VISTA, 7
-----------------------------------------------------------------------
Installation Procedure:

 just run mcphX_Y.exe and follow the instructions

 In case of problems:
 In order that McPhas finds its exe files,you have to edit
 the file dos.bat and modify the following commands:
 
 set the variable MCPHASE_DIR to your mcphase directory (no spaces in pathname
 allowed), in our example  to c:\mcphas
  
   set MCPHASE_DIR=c:\mcphas
  
 Now the Installation should be complete and to test this 
   open the mcphas-shell, change into an example directory:

   cd c:\mcphas\examples\ndcu2b_new

  and type:

   mcphas

-> the program should start running


[ for compiling the sources:
  (necessary if mcphas does not run on your system after installation
    * gcc for windows (e.g. MinGW-4.3.5.exe (or newer) and MSYS-1.0.10.exe
    available at http://www.mingw.org)
    * java (> 1.6.0)  available at java.sun.com,
     if you do not know wether java (and which version) is installed
     on your computer, open a dos shell and type:
     java -version

    install MSYS2 (see http://msys2.github.io)
    install gcc and gcc-fortran using packman

    cd  mcphas\
    type: make clean
          make

 OPTIMIZATION:
 if you want to compile with more optimization to make the program faster, try instead of
 make

 make clean
 make fast=1

 If you have a multiple core processor and want to set the number of threads -
 There are 3 ways to set the number of threads:

1. Using a system variable: MCPHASE_NOFTHREADS - this could be set
e.g. in dos.bat (I've not changed this file - so for the distribution
you could change it maybe to a commented out value for users to see).

2. In mcphas.ini or mcdisp.par with the variable: nofthreads=

3. If neither of the above variables are specified, the program
attempts to determine the number of (logical) cores and sets the
number of threads equal to this value. For a modern-ish quad core
computer this number will probably be 8 (two logical cores per
physical cores with hyperthreading).

If it fails to determine the number of cores it sets it to 1.

There is a hardcoded maximum of 255 threads.


]

-------------------------------------------------------------------
II  LINUX 
-------------------------------------------------------------------
Prerequisits:
- for compiling and running McPhas, McDisp
    Suse Linux 6.0/ 6.2/ 7.0/ 7.1 / 7.2 / 8.1 / 9.2
         with
    gcc, gfortran or g77
    perl
    java
    PDL 2.0      PerlDL
            http://pdl.perl.org
    
- option (needed only for some old plotting programs):
    flex
    yacc
    PGPLOT 5.2.0 graphics library
            http://www.astro.caltech.edu/~tjp/pgplot/
    PGPLOT 2.11/2.18  pgplot module for perl
            ftp://ftp.freenet.de/pub/ftp.cpan.org/pub/CPAN/modules/by-
            module/PGPLOT/
            http://www.aao.gov.au/local/www/kgb/pgperl/    
            NOTE THE INSTALLATION BUG FOR >SUSE 6.2: after typing 'perl 
            Makefile.PL'
	    you have to manually edit 'Makefile' and substitute 'f2c' with 'g2c' 
            before
	    continuing with 'make' and 'make test' ...   
-----------------------------------------------------------------------
Installation Procedure:

a) unpack and untar the zip file into your mcphase directory, in our example /usr/local

    gunzip mcphas-*.*.tar.gz

    tar -xvf mcphas-X.Y.tar


b) In order that McPhas finds its  files,you have to edit
 the file lin.bat and modify the following commands:
 
 set the variable MCPHASE_DIR to your mcphase directory, in our example
 to /usr/local/mcphas
  
   export MCPHASE_DIR=/usr/local/mcphas
   
    - in order to use the plotting programs
      make sure that the other variables are set correctly

   in order to set the above environment at login put the above export
   commands into /etc/profile.local 
   e.g. put there:

   . /data/martin/mcphas/lin.bat



c) Now the installation should be complete. To test the Program: 
   goto your mcphase directory and set the environment variables correctly by typing:
   
   . ./lin.bat
   
   
   goto directory ./demo
   and run the demos to test many of the programs of the package

[e) if it is necessary to recompile the sources -

    goto $MCPHASE_DIR and type:

    make
   
 OPTIMIZATION:
 if you want to compile with more optimization to make the program faster, try instead of
 make

 make clean
 make fast=1
 
 (this might work not on all systems)

  If you have a multiple core processor and want to set the number of threads -
  There are 3 ways to set the number of threads:

 1. Using a system variable: MCPHASE_NOFTHREADS - this could be set
 e.g. in dos.bat (I've not changed this file - so for the distribution
 you could change it maybe to a commented out value for users to see).

 2. In mcphas.ini or mcdisp.par with the variable: nofthreads=

 3. If neither of the above variables are specified, the program
 attempts to determine the number of (logical) cores and sets the
 number of threads equal to this value. For a modern-ish quad core
 computer this number will probably be 8 (two logical cores per
 physical cores with hyperthreading).

 If it fails to determine the number of cores it sets it to 1.

 There is a hardcoded maximum of 255 threads.

f) type 

   make clean
   
   to remove files which are not needed
]



Martin Rotter 2017-01-10