IBM XL CC++Fortran for AIX by hcw25539

VIEWS: 79 PAGES: 22

									IBM XL C/C++     Fortran for AIX


      hmli@ustc.edu.cn, lihm@qibebt.ac.cn



                 2009   12




  (    )          IBM                   2009   12   1 / 22
1   IBM XL C/C++ Fortran for AIX

2   IBM XL C/C++ for AIX

3   IBM XL Fortran for AIX

4            dbx

5




        (       )            IBM   2009   12   2 / 22
IBM XL C/C++ Fortran for AIX

IBM XL C/C++ for AIX    IBM XL Fortran for AIX
                                                        C/C++
  Fortran
    JS22
   C/C++         10.1         /usr/vacpp
   Fortran       12.1         /usr/lpp/xlf




      (      )          IBM                      2009   12   3 / 22
1   IBM XL C/C++ Fortran for AIX

2   IBM XL C/C++ for AIX

3   IBM XL Fortran for AIX

4            dbx

5




        (       )            IBM   2009   12   4 / 22
                 I

                        xlc   xlc++   xlC   cc c89   c99   xlCcore
xlc++core
   xlc        xlc r7    xlc128 xlc128 r xlc128 r4    xlc128 r7      C
                       ANSI C89 ISO C99 IBM
   xlc++ xlc++ r xlc++ r4 xlc++ r7 xlc++128
   xlc++128 r xlc++128 r4 xlc++128 r7 xlC xlC r xlC r4
   xlC r7 xlC128 xlC128 r xlC128 r4 xlC128 r7   C++

   cc        cc r cc r4 cc r7 cc128 cc128 r cc128 r4 cc128 r7
                C                   pre-ANSI C
   c89        c89 r c89 r4 c89 r7 c89 128 c89 128 r c89 128 r4
   c89       128 r7           C89       C                   ANSI C89
   c99        c99 r c99 r4 c99 r7 c99 128 c99 128 r c99 128 r4
   c99       128 r7           C99       C                   ISO 99



         (              )             IBM                        2009   12   5 / 22
         II
xlc++core xlc++core r xlc++core r7 xlc++core128
xlc++core128 r xlc++core128 r7 xlCcore xlCcore r
xlCcore r7 xlC128core xlC128core r xlC128core r7            C++

gxlc          GNU C                      XL C
xlc
gxlc++        gxlC     GNU C/C++                                 XL
C++                   xlc++


          r                              r4     r7                DCE
  53 POSIX Draft 7 Threads
OpenMP
128            64                  128

/etc/vac.cfg.61

   (            )        IBM                         2009   12        6 / 22
             I

IBM                               q
      -q<option>
      -q<option>=<suboption>
      -q<option>=<suboption>:<suboption>


      -q32    -q64          32          64        -q32     -q64
         -qarch    -qtune
                                 -q32
      -qsmp=omp                          OpenMP          OpenMP




         (         )             IBM                2009   12     7 / 22
       II
-qarch=<suboption>
                            -qarch
                               -qarch
  -qtune                                            JS22
  auto pwr6       pwr6e
-qtune=<suboption>
<suboption>      JS22                   auto pwr6   pwr6e
-qipa=<suboption>
-qpdf1=<suboption>        -qpdf2=<suboption>
  PDF
-qlanglvl=<suboptions list>
<suboptions list>        { classic |extended|saa|saa12|stdc89|
stdc99|extc89|extc99}:{ucs|noucs}
                                            xlc

   (        )              IBM                      2009   12    8 / 22
     filename.c     C
     filename.C
    filename.CC
     filename.cc   C++
    filename.cpp
    filename.cxx
     filename.a
     filename.so
      filename.i
     filename.o
     filename.s

(      )           IBM   2009   12   9 / 22
    filename.i         -p
    filename.o         -c
    filename.s         -s
       a.out




(     )         IBM        2009   12   10 / 22
      OpenMP

   C     yourprog.c                  yourprog
xlc −o yourprog yourprog.c
   C     yourprog.c                yourprog.o
xlc −c yourprog.c
       lapack    C      yourprog.c
yourprog
xlc −o yourprog −L/opt/lib −llapack yourprog.c
   C    yourprog.c            O3                        yourprog
xlc −O3 −bstatic −o yourprog yourprog.c
   C++     yourprog.cpp                   yourprog
xlc++ −o yourprog yourprog.cpp
  OpenMP              C     yourprog-omp.c              64
                 yourprog-omp
xlc −o yourprog−omp −qsmp=omp −qtune=auto −q64 yourprog.c


  (        )           IBM                       2009   12    11 / 22
SMP
               MASS                32   64

              XL C/C++ Programming Guide            Using the
Mathematical Acceleration Subsystem
                            BLAS

                       XL C/C++ Programming Guide
Using the Basic Linear Algebra Subprograms




  (       )           IBM                    2009    12    12 / 22
1   IBM XL C/C++ Fortran for AIX

2   IBM XL C/C++ for AIX

3   IBM XL Fortran for AIX

4            dbx

5




        (       )            IBM   2009   12   13 / 22
xlf   f77       fort77        f90     xlf90    f95      xlf95   f2003   xlf2003


      xlf       xlf r        xlf r7    f77     fort77           Fortran 77
      xlf90 xlf90 r xlf90 r7 f90                            Fortran 90
      xlf95 xlf95 r xlf95 r7 f95                            Fortran 95
      xlf2003 xlf2003 r f2003                           Fortran 2003


                 r                                                 r4    r7              DCE
         53 POSIX Draft 7 Threads
      OpenMP
      128       64                                        128

      /etc/xlf.cfg.61
            (            )                    IBM                            2009   12   14 / 22
             I

IBM                             q
      -q<option>
      -q<option>=<suboption>
      -q<option>=<suboption>:<suboption>


      -q32   -q64        32      64               -q32          -q64
      -qarch   -qtune
                                      -q32
      -qfree[=f90|ibm]        Fortran 90 Fortran 95 Fortran 2003
      VS Fortran
      -qfixed[=<right margin>]                      [
      <right margin>]
      -qsmp=omp                       OpenMP                OpenMP


         (         )           IBM                       2009    12    15 / 22
       II
-qextname=<names>                                  flush

-qarch=<suboption>
                           -qarch
                              -qarch
  -qtune                                         JS22
  auto pwr6      pwr6e
-qtune=<suboption>
    <suboption>    JS22                auto pwr6        pwr6e
-qipa=<suboption>
-qpdf1=<suboption>       -qpdf2=<suboption>
  PDF
-qlanglvl=<suboptions list>
<suboptions list>        {77std|90std|90pure|90ext|95std|95pure
|2003std|2003pure|extended}                      extended
  (         )             IBM                    2009   12      16 / 22
        III
-qsuffix=<suboption>=<suffix>

      f=<suffix>              <suffix>
      o=<suffix>              <suffix>
      s=<suffix>              <suffix>
      cpp=<suffix>                <suffix>
                                xlf




  (           )    IBM                   2009   12   17 / 22
    filename.a
    filename.f
    filename.f77
    filename.f90
    filename.f95   Fortran   Fortran
    filename.f03
    filename.i
    filename.F     Fortran      Fortran
    filename.f90   Fortran   Fortran
    filename.i90
    filename.F90   Fortran      Fortran
    filename.F95   Fortran      Fortran
    filename.F03   Fortran      Fortran
    filename.s
    filename.so
    filename.o




(             )       IBM                2009   12   18 / 22
filename.o                  -c
filename.so                           -shared    -c
filename.mod               MODULE
filename.s                  -S
a.out                         -c
filename.*pdf*              -qpdf1
filename.lst




      (         )   IBM             2009   12   19 / 22
      OpenMP

   Fortran 77     yourprog.f      32                   yourprog
xlf r −o yourprog yourprog.f
   Fortran 90     yourprog.f90       64
yourprog
xlf90 r −o yourprog −q64 yourprog.f90
       lapack     Fortran 90     yourprog.f90
   yourprog
xlf90 r −o yourprog −L/opt/lib −llapack yourprog.f90
   Fortran 95    yourprog.f90           O3
yourprog
xlf95 r −O3 −bstatic −o yourprog yourprog.f95
  OpenMP       Fortran 95    yourprog-omp.f95            64
                  yourprog-omp
xlf95 r −o yourprog−omp −qsmp=omp −qtune=auto −q64 yourprog.f95


  (        )            IBM                     2009    12    20 / 22
        dbx

  -g                  dbx
gdb
  dbx    help




    (    )      IBM         2009   12   21 / 22
    http://scc.ustc.edu.cn
    0551-3602248
    sccadmin@ustc.edu.cn

        http://124.16.151.186
        http://scc.qibebt.cas.cn
    0532-80662613
    scc@qibebt.ac.cn

    http://staff.ustc.edu.cn/~hmli/
    0532-80662613
    hmli@ustc.edu.cn lihm@qibebt.ac.cn




(    )            IBM                    2009   12   22 / 22

								
To top