Lahey/Fujitsu Fortran 95 -- LF95 -- 6May03 Copyright (c) 2003, Lahey Computer Systems, Inc. Copyright (c) 2003, FUJITSU, LTD. Lahey/Fujitsu Fortran 95 Package for Linux ---------------------------------------------------------- 0. Trial information 1. Installing LF95 2. Minimum System Requirements 3. Using LF95 4. Verifying the installation 5. Documentation 6. Uninstalling LF95 7. Release Notes 8. New Features 9. Multi-processing 10. Configuring MPICH for LF95 11. Known Technical Issues 12. Year 2000 Issues ---------------------------------------------------------- 0. Trial information This trial is provided for evaluation purposes. The license for this installation will expire on a predetermined date. See http://www.lahey.com/tri_down.htm for expiration date for download currently available. The expiration date is also listed in the README file of the download. WiSK, BLAS, LAPACK, and SSL2 are not operable but example binaries have been provided for review in the (INSTALL DIRECTORY)/examples directory. These libraries are provided in the release version. The trial compiler prints a banner designating it as a trial installation. The release compiler does not do this. Any programs created with the trial will also display a banner at runtime. This banner is not present in the release version. A license manager is used to limit the life of the trial. This licenese manager creates multiple small files in the current working directory. These files are: clauth1.dll, clauth2.dll, lsprst7, lsprst7.tgz, ssprs.dll, ssprs.tgz, sysprs7, and sysprs7.tgz. For the license manager to work correctly the LSERVRC environment variable needs to be equal to the location of the lservrc file istalled with the LF95 Trial. ie (INSTALL DIRECTORY)/bin/lservrc 1. Installing LF95 The following steps will guide you through the installation process. 1) Login to your Linux system as root. 2) Insert the LF95 CD into your CD and mount the drive. Check your Linux documentation for mounting instructions. To run the install from the CD it must be mounted with execute permissions. 3) Change to your CD directory and run ./install to display the setup menu. 4) To install LF95 Linux v6.2, select "Install Lahey/Fujitsu Fortran 95 Linux v6.2" from the Lahey/Fujitsu Fortran 95 Linux Setup Menu. The default installation directory is /usr/local/lf9562, however, you can change it to a directory of your choice during the installation. 5) To install Adobe Acrobat-Reader 5.0 select "Install Adobe Acrobat Reader 5.0" from the Lahey/Fujitsu Fortran 95 Linux Setup Menu. 6) Please view the "Adobe Acrobat Reader 5.0 Installation Guide" to learn how to install and setup Acrobat Reader for viewing the LF95 online documentation. The online documentation is on the CD and is installed in the manuals subdirectory of the LF95 installation directory. 2. Minimum System Requirements Operating System We support LF95 on the following Linux distributions: Distribution Kernel libc -------------------------------- Debian v3.0 2.2.20 2.2.5 Mandrake v8.2 2.4.18-6 2.2.4 Mandrake v9.0 2.4.19 2.2.5 Mandrake v9.1 2.4.21 2.3.1 Red Hat v7.2 2.4.7 2.2.4 Red Hat v7.3 2.4.18 2.2.5 Red Hat v8.0 2.4.18 2.2.93 Slackware v8.1 2.4.18 2.2.5 SuSE v7.2 2.4.4 2.2.2 SuSE v7.3 2.4.10 2.2.4 SuSE v8.0 2.4.18 2.2.5 SuSE v8.1 2.4.19 2.2.5 Please see our web site, www.lahey.com, for a complete list of tested and supported operating systems. The LF95 installation assumes that "as" (the GNU assembler), "ld" (the GNU linker), and crt1.o are available on the system. If they are not, "as" and "ld" are part of the binutils package and crt1.o is part of the glibc-devel package. glibc Version 2.2.4 or later CPU Intel(R) i386 family or compatible CPU Hardware PC/AT compatible Disk 40MB Express 70MB PRO Memory 32MB RAM X-Windows to view online PDF documentation 3. Using LF95 Environment variables The following environment variables must contain the information described for correct operation of LF95: PATH - (INSTALL DIRECTORY)/bin LD_LIBRARY_PATH - (INSTALL DIRECTORY)/lib An alternative to setting LD_LIBRARY_PATH is to add (INSTALL DIRECTORY)/lib to /etc/ld.so.conf and run /sbin/ldconfig. MANPATH - (INSTALL DIRECTORY)/manuals/man/lf95 & (INSTALL DIRECTORY)/manuals/man/ssl2 (PRO Edition only) PFDIR - (INSTALL DIRECTORY)/bin (PRO Edition only) WISK - (INSTALL DIRECTORY)/ (PRO Edition only) Shell environment setup via bash_setup and/or csh_setup To use the LF95 products and view man pages, the shell environment variables must be updated with LF95 information. To accomplish this, two scripts have been created in LF95 installation directory. The script bash_setup is used to update the bash environment and the csh_setup script is used to update the csh environment. One of these scripts can be executed via the source command to set up the respective bash or csh environment. For example, the following command will update the environment variables of the csh shell: "source (INSTALL DIRECTORY)/csh_setup" Note, depending on your system you may need to execute bash_setup via the "." command for the settings to take effect. To update a shell environment automatically, this command can be added to the system login script(s) /etc/bashrc (for bash) and /etc/csh.cshrc (for csh). If this is done, the respective shell will be set up each time a user logs on to the system. These changes are not required. If you choose not to update a system login script via the LF95 installation, then you must manually set the environment or execute either bash_setup or csh_setup. Note that either bash_setup or csh_setup must be executed after each login to the system and before running LF95. Note: The LF95 driver program (lf95) makes calls to the LF95 file f95 included in the bin directory of the LF95 installation. If another file with this name is available via the PATH environment variable before the LF95 version, the system will call it instead with unknown results. Lahey/Fujitsu Fortran 95 Compiler, LF95 To use LF95, type the following at the command prompt: lf95 sourcefile (where sourcefile is the name of the file to compile) Fujitsu Debugger, FDB To use the debugger type the following at the command prompt: fdb executable (where executable is the -g compiled program to debug) 4. Verifying the installation To verify that LF95 has been installed correctly, compile and run an example program. During the installation the example program, demo.f90, is installed in the (INSTALL DIRECTORY)/examples/fortran directory. From the command prompt, build the demo program by changing to the directory where demo.f90 is installed, and entering: lf95 demo.f90 This causes the compiler to read and compile the source file demo.f90 and generates modules utilities_module.mod and constants_module.mod. The modules are then combined with the demo object file and the runtime libraries via the linker ld to form the executable file a.out. Run the demo program executable by typing its name at the command prompt preceded by ./ to reference the current directory: ./a.out The demo program will begin with the following header and menu: Lahey/Fujitsu LF95 Compiler --------------------------- installation test and demonstration program Copyright(c) 2000 Lahey Computer Systems, Inc. ----------------- Test/Action List: ----------------- 1 - factorials 2 - Fahrenheit to Celsius conversion 3 - Carmichael numbers 4 - Ramanujan's series 5 - Stirling numbers of the 2nd kind 6 - chi-square quantiles 7 - Pythagorean triplets 8 - date_and_time, and other system calls 0 - Please select an option by entering the associated number followed by . By completing these steps you have verified the installation of LF95 and have successfully built and run the example program. 5. Documentation Use Acrobat Reader to view the online manuals. Please view the "Adobe Acrobat Reader 5.0 Installation Guide" for directions on installing and using Acrobat Reader for viewing the LF95 online documentation. Note that Xwindows must be installed to use Acrobat Reader. A PDF version of the LF95 User's Guide is installed as (INSTALL DIRECTORY)/manuals/usr_man.pdf. A man page for LF95 is also available. A PDF version of the LF95 Language Reference is installed as (INSTALL DIRECTORY)/manuals/langref.pdf. Man pages for many Fortran intrinsic functions are also available. PRO Edition only Automake An Automake man page is available as "am" and a resource compiler man page is available as "rc". Information is also included in the LF95 User's Guide. Wisk documentation is installed as (INSTALL DIRECTORY)/manuals/wisk_man.pdf. Additional help files are supplied in HTML format in (INSTALL DIRECTORY)/help/, accessible via the main index.htm file. To access the on-line help files from within WiSK's visual tools the WISK environment variable needs to be set to (INSTALL DIRECTORY)/. OpenMP documentation is installed as (INSTALL DIRECTORY)/manuals/OpenMP_Fortran_API.pdf BLAS/LAPACK documentation is installed as (INSTALL DIRECTORY)/manuals/blaseman.pdf and (INSTALL DIRECTORY)/manuals/blas_index_E.htm SSL2 documentation includes: (INSTALL DIRECTORY)/manuals/ssl2_comp_E.htm (INSTALL DIRECTORY)/manuals/ssl2_example_E.pdf (INSTALL DIRECTORY)/manuals/ssl2_index_E.htm (INSTALL DIRECTORY)/manuals/ssl2_list_E.htm (INSTALL DIRECTORY)/manuals/ssl2eman.pdf (INSTALL DIRECTORY)/manuals/ssl2ex2man.pdf (INSTALL DIRECTORY)/manuals/ssl2exeman.pdf Man pages for individual SSL2 libraries are also available. 6. Uninstalling LF95 To uninstall LF95, run (INSTALL DIRECTORY)/uninstall. During the uninstall, you will be prompted to undo changes made by the installation to /etc/profile, /etc/bashrc, /etc/csh.cshrc, or /etc/csh.login. Note, if user files have been added to the installation directories, they will not be removed by the uninstall program. The directories that contain these files will also not be removed and the uninstall program will state this. 7. Release Notes See BUGFIX for bug fix descriptions. Version 6.20a: ============== The interface for modules has changed. If a module is compiled with LF95 v6.2 then the any program unit that uses the module must be re- compiled with LF95 v6.2. A program unit built with LF95 v6.2 can use a module compiled with LF95 v6.1. glibc: LF95 libraries have been updated so that the compiler is compatible with glibc 2.2.4 or later. --tpp is the default processor option. --cpus no longer supported. Use OMP_SET_NUM_THREADS service routine or OMP_NUM_THREADS environment variable to control the number of threads. --threadstack no longer supported. Use THREAD_STACK_SIZE environment variable to control executable stack size. 8. New Features New Features in v6.20a ====================== --o2 optimization This optimization level implements full unrolling of nested loops, loop splitting to promote loop exchange, and array optimizations. --tp4 optimization Generate code optimized for the Intel(R) Pentium(R) 4 processors. Please note: code generated with --tp4 is not compatible with processors made previous to the Pentium(R) 4. --sse2 option Optimize code using the streaming SIMD (Single Instruction Multiple Data) extensions. --zfm option This option activates the zero flash mode of SIMD floating point. --unroll option Controls the level of loop unrolling. --varheap option Causes local variables to be allocated on the heap rather than in the bss segment. -x option Specify -x to cause procedures to be inserted inline at the point they are referenced in the calling code. THREAD_STACK_SIZE environment variable When used, it sets the stack size in Kilobytes for each thread stack. Local variables in DO loops and array operations are allocated on the stack. FLIB_SPINWAIT environment variable Used to specify the mode of waiting threads. OpenMP V2.0 specification is supported. SSL II 9 functions (17 routines) added. High performance library using SSE2 instructions for Pentium(R) 4 processor added. BLAS High performance parallelized versions of the BLAS library have been added, including a version optimized for Pentium 4 with SSE2 instructions. LAPACK The Netlib LAPACK v3.0 library has been added. It can be used in conjunction with the parallelized versions of BLAS for additional performance. 9. Multi-processing Cluster Technology: The first thing to mention is the advent of the cluster. This is simply put, the ability to set up multiple computers in a message- sharing scheme allowing them to share the workload of a program. This has become a very popular idea amongst the Linux community. The following technology is publicly available and can be used to create programs that run on clusters. MPI: MPI is a library specification for message passing, proposed as a standard by a broadly based committee of vendors, implementers, and users. Information on MPI can be found at http://www.mcs.anl.gov/mpi. For our testing, we use MPICH. It is an MPI package developed at the Argonne National Laboratory, and is a freely available, portable implementation of MPI. MPICH is a full implementation of MPI, so your existing MPI applications will port easily to your Linux cluster. You can go to http://www-unix.mcs.anl.gov/mpi/mpich for more information. Multi-Processor OpenMP: OpenMP and auto-parallelizing support is included in LF95 Linux PRO v6.2. See "Chapter 4, Multi-processing" in the LF95 User's Guide. For more information on OpenMP please visit http://www.openmp.org and see the documentation in the users guide. 10. Configuring MPICH for LF95 Once the MPICH package has been extracted on to the local PC it can be configured for LF95 by using the configure script in the ~/mpich-1.2.5 directory. Help for the configure script can be seen by issuing the command: ./configure -help |more A basic configuration of MPICH for LF95 can be done with the following configure command: ./configure -fc=lf95 -f90=lf95. This command will set LF95 as both the FORTRAN 77 and Fortran 90 compiler. It will also find and test LF95 and generate a makefile to direct the actual building of MPICH. Once configuration is complete, you can build MPICH by typing make. Once made, you may have to modify a couple of files before using MPICH. The first is ~/mpich-1.2.5/util/machines/machines.LINUX. This file should contain the domain name of every machine that will run mpich programs. The second file is the /etc/hosts.equiv file. This file should contain the domain name of the machine on which MPICH is installed. Each node will also need to mount the ~/mpich-1.2.5 directory of the machine on which MPICH is installed. And, the LD_LIBRARY_PATH environment variable will need to be set to the path to the LF95 libraries of the machine on which MPICH is installed. A set of test routines comes with MPICH that can be used to validate the installation. Some simple tests are in the ~/mpich-1.2.5/examples/basic directory. To make and run the Fortran example fpi using the following commands: make fpi ../../bin/mpirun -np 4 fpi 11. Known Technical Issues The interface for modules has changed. If a module is compiled with LF95 v6.2 then the main program that uses the module must be re- compiled with LF95 v6.2. A main program built with LF95 v6.2 can use a module compiled with LF95 v6.1. 12. Year 2000 Issues Lahey compilers include a 2-digit date subroutine called DATE() that returns the last two digits of the current system date. Changing the output of this subroutine to 4 digits would cause problems in existing code so this subroutine will not be revised (however, the compiler will issue a warning that DATE does not return 4-digit year value). If you have code that calls the DATE subroutine, and that code assumes that the century is 1900, you may be subject to "Year 2000" problems. LF95 includes the Fortran 95 Standard DATE_AND_TIME subroutine. DATE_AND_TIME returns a 4-digit date. We recommend changing all code that uses DATE to use DATE_AND_TIME instead. DATE_AND_TIME is not included with our Fortran 77 compiler, F77L-EM/32. We recommend that EM/32 owners upgrade to LF95.