6 Replies Latest reply on Jun 23, 2013 10:16 PM by nena

    Compiling WRF 3.4.1 with open64 4.5.2

    sten

      Hi,

      I'm not really a programmer, so not sure how to go about solving the issues I'm facing.

       

      I am trying to compile wrf 3.4.1 with openmpi 1.6.1 compiled with open64 4.5.2, but can't get it to work. Any help would be greatly appreciated.

       

      I have built openmpi 1.6.1 using OFED stack and open64, then built zlib , hdf5 , netcdf-c/cxx/fortran using my compiled code.

      Trying to build WRF I get multiple errors starting with:

       

      flush(6)

        ^

      openf95-113 openf90: ERROR WRF_ERROR_FATAL3, File = module_wrf_error.f90, Line = 104, Column = 3

        IMPLICIT NONE is specified in the local scope, therefore an explicit type must be specified for data object "FLUSH".

             ^

      openf95-724 openf90: ERROR WRF_ERROR_FATAL3, File = module_wrf_error.f90, Line = 104, Column = 8

        Unknown statement.  Expected assignment statement but found "(" instead of "=" or "=>".

       

        flush(0)

             ^

      openf95-724 openf90: ERROR WRF_ERROR_FATAL3, File = module_wrf_error.f90, Line = 105, Column = 8

        Unknown statement.  Expected assignment statement but found "(" instead of "=" or "=>".

       

      openf95: Open64 Fortran Version 4.5.2 (f14) Fri Dec  7, 2012  08:26:18

      openf95: 129 source lines

      openf95: 3 Error(s), 0 Warning(s), 0 Other message(s), 0 ANSI(s)

      openf95: "explain openf95-message number" gives more information about each message

      make[2]: [module_wrf_error.o] Error 2 (ignored)

      rm -f module_driver_constants.o

       

      later there is:

       

      MODULE module_domain_type

             ^

      openf95-855 openf90: ERROR MODULE_DOMAIN_TYPE, File = module_domain_type.f90, Line = 2, Column = 8

        The compiler has detected errors in module "MODULE_DOMAIN_TYPE".  No module information file will be created for this module.

       

         USE module_utility

             ^

      openf95-292 openf90: ERROR MODULE_DOMAIN_TYPE, File = module_domain_type.f90, Line = 5, Column = 8

        "MODULE_UTILITY" is specified as the module name on a USE statement, but the compiler cannot find it.

       

            Type(WRFU_Clock), POINTER :: domain_clock

                 ^

      openf95-126 openf90: ERROR MODULE_DOMAIN_TYPE, File = module_domain_type.f90, Line = 3440, Column = 12

        Derived type "WRFU_CLOCK" is used, but it does not have any components defined for it.

       

            Type(WRFU_Time) :: start_subtime, stop_subtime

                            ^

      openf95-126 openf90: ERROR MODULE_DOMAIN_TYPE, File = module_domain_type.f90, Line = 3441, Column = 23

        Derived type "WRFU_TIME" is used, but it does not have any components defined for it.

       

            Type(WRFU_TimeInterval), DIMENSION(MAX_WRF_ALARMS) :: io_intervals

                                                               ^

      openf95-126 openf90: ERROR MODULE_DOMAIN_TYPE, File = module_domain_type.f90, Line = 3444, Column = 58

        Derived type "WRFU_TIMEINTERVAL" is used, but it does not have any components defined for it.

       

            Type(WRFU_Alarm), POINTER :: alarms(:)

                 ^

      openf95-126 openf90: ERROR MODULE_DOMAIN_TYPE, File = module_domain_type.f90, Line = 3445, Column = 12

        Derived type "WRFU_ALARM" is used, but it does not have any components defined for it.

       

      openf95: Open64 Fortran Version 4.5.2 (f14) Fri Dec  7, 2012  08:26:18

      openf95: 3474 source lines

      openf95: 6 Error(s), 0 Warning(s), 0 Other message(s), 0 ANSI(s)

      openf95: "explain openf95-message number" gives more information about each message

      make[2]: [module_domain_type.o] Error 2 (ignored)

      rm -f module_quilt_outbuf_ops.o

       

       

      and many other errors until the compilation ends with no .exe files in main/ ( but links in run/ are created)

       

      Some info I hope will help:

       

      I'm building on PileDriver machine ( 4 sockets x 8 modules x 2 cores )

      # lscpu

      Architecture:          x86_64

      CPU op-mode(s):        32-bit, 64-bit

      Byte Order:            Little Endian

      CPU(s):                64

      On-line CPU(s) list:   0-63

      Thread(s) per core:    2

      Core(s) per socket:    8

      CPU socket(s):         4

      NUMA node(s):          8

      Vendor ID:             AuthenticAMD

      CPU family:            21

      Model:                 2

      Stepping:              0

      CPU MHz:               1400.000

      BogoMIPS:              4599.52

      Virtualization:        AMD-V

      L1d cache:             16K

      L1i cache:             64K

      L2 cache:              2048K

      L3 cache:              6144K

      NUMA node0 CPU(s):     0-7

      NUMA node1 CPU(s):     8-15

      NUMA node2 CPU(s):     16-23

      NUMA node3 CPU(s):     24-31

      NUMA node4 CPU(s):     32-39

      NUMA node5 CPU(s):     40-47

      NUMA node6 CPU(s):     48-55

      NUMA node7 CPU(s):     56-63

       

      OS: CentOS 6.3

      # uname -a

      Linux localhost.localdomain 2.6.32-279.14.1.el6.x86_64 #1 SMP Tue Nov 6 23:43:09 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

       

      # cat /proc/cpuinfo

      ...

      processor    : 63

      vendor_id    : AuthenticAMD

      cpu family    : 21

      model        : 2

      model name    : AMD Opteron(tm) Processor 6376                

      stepping    : 0

      cpu MHz        : 1400.000

      cache size    : 2048 KB

      physical id    : 3

      siblings    : 16

      core id        : 7

      cpu cores    : 8

      apicid        : 143

      initial apicid    : 111

      fpu        : yes

      fpu_exception    : yes

      cpuid level    : 13

      wp        : yes

      flags        : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nonstop_tsc extd_apicid amd_dcm aperfmperf pni pclmulqdq monitor ssse3 fma cx16 sse4_1 sse4_2 popcnt aes xsave avx f16c lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs xop skinit wdt lwp fma4 tce nodeid_msr tbm topoext perfctr_core cpb npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold bmi1

      bogomips    : 4599.52

      TLB size    : 1536 4K pages

      clflush size    : 64

      cache_alignment    : 64

      address sizes    : 48 bits physical, 48 bits virtual

      power management: ts ttp tm 100mhzsteps hwpstate cpb eff_freq_ro

       

      Attached the configure.wrf and the complete compilation log. If there is any further info I can provide, please let me know.

       

      Thanks,

        • Re: Compiling WRF 3.4.1 with open64 4.5.2
          santosh.zanjurne

          While configuring WRF use pathscale compiler option and then change the compiler names.  Open64 compiler supports few of the 2003 FORTRAN standard features. 'flush' and 'read' are not supported so you will have to modify the sources and delete the 'flush' function call and remove the default value parameter of the read function call.  Also make sure netcdf binaries are build using -fno-second-underscore.  I should have been more explicit in explaining this in the first time itself, sorry about that.

           

          Message was edited by: Santosh Zanjurne

            • Re: Compiling WRF 3.4.1 with open64 4.5.2
              sten

              I have done as suggested, chose option 22 and then made the changes in configure.wrf:

               

              Changed pathf90,pathcc to openf90,opencc

               

              netcdf was previously compiled with mpicc (opencc) /mpif90 (openf90): libnetcdf,libnetcdff with both -fno-second-underscore and -DpgiFortarn.

               

              The result still has errors, and the exe files are still not made under main/

              • Re: Compiling WRF 3.4.1 with open64 4.5.2
                nena

                Hi Santosh and Sten,

                 

                I'm also trying to build WRF 3.4.1 using the x86_Open64 compilers. Santosh, I've read your reply regarding flush and read not being supported. I don't exactly know what you mean about modifying the source to remove function calls to flush and read. Can you give me a list of files to modify and which lines to remove?

                 

                Your help is greatly appreciated.

                 

                Thanks,

                Nena

                  • Re: Compiling WRF 3.4.1 with open64 4.5.2
                    saravanan_ekanathan

                    Hi Nena,

                    Please comment/remove all occurrences of the FLUSH function call and remove the default value parameter of the read function call in WRF source code. Hope this helps.

                    Regards,

                    Saravanan

                      • Re: Compiling WRF 3.4.1 with open64 4.5.2
                        nena

                        Hi Saravan,

                         

                        Sorry I was not able to give my feedback right away. I am still confused as to which files I need to edit and which lines. I am not very familiar with the FORTRAN language. In the meantime, I just settled with the GNU compilers as I am not able to make the AMD Open64 compilers to work for me.

                         

                        I really would like to be able to compile WRF using the AMD Open64 compilers as I believe it should be able to optimize the code better as I am using an AMD Opteron Processor 6376. I'd really appreciate it if you could somehow give me a list of files I need to edit, and which lines. I am using WRF 3.4.1 by the way. I have already compiled NETCDF using the flags suggested above.


                        Thanks and regards,


                        Nena