Results 1 to 8 of 8

Thread: Compiling Hydrodynamic Model using ifort on Intel Quad-Core

  1. #1
    Join Date
    Sep 2010
    Posts
    47

    Compiling Hydrodynamic Model using ifort on Intel Quad-Core

    Recently bought a DELL computer, compatible with windows vista and Intel quad-core processor. Tried for compile the C++ program into my computer using ifort for an hydrodynamic model. The program has an OpenMP directives. And activate all properly. After initiating to run the program by compiling 4 processor all the programs set default shortly. The programs run successfully by the pgf90. I runs the program on the Portland Group Fortran Compiler without make change on the code. My question is, what pgf 90 does automatically, that I done by ifort manually?

  2. #2
    Join Date
    Aug 2008
    Posts
    721

    Re: Compiling Hydrodynamic Model using ifort on Intel Quad-Core

    The OpenMP codes are quite ok when you tried to compile the program. You should check the linking step of the compilation with proper modules and sub-routines. I am giving you the steps of ifort compiler option:
    ifort -openmp -c -module program
    ifort -openmp -threads -o program
    Make sure that your ifort compiler follows these compile steps.
    Last edited by Broad-Man; 22-09-2010 at 05:28 PM.

  3. #3
    Join Date
    Dec 2007
    Posts
    765

    Re: Compiling Hydrodynamic Model using ifort on Intel Quad-Core

    According to your post, I think the compiler and link script of your computer are working well. As you are able to run the program for the 4 processors by using pgf90, the only difference is that the script for ifort and pgf90 are used for the call in your program. The options which are mostly needed for compile the program are “pgf90 -Mnosgimp -mp -c -module program” and “pgf90 -mp -o program”. Make it sure during your compilation the pgf90 using this two options for terminate the program.
    No TechArena No Experts, Know TA know Experts!

  4. #4
    Join Date
    Sep 2005
    Posts
    1,370

    Re: Compiling Hydrodynamic Model using ifort on Intel Quad-Core

    I would like to suggest you to download the Intel Threading Building Blocks, to overcome from your issue. It sets default during compilation of the program in the first loop. Which may appear in the memory allocation issue. Remember that about your issue, before crash the program the processor load will set in all over the places.
    DFI LANPARTY SLI-DR
    AMD 64 x2 4800+
    OCZ (2 x 512) DDR600

  5. #5
    Join Date
    Dec 2005
    Posts
    945

    Re: Compiling Hydrodynamic Model using ifort on Intel Quad-Core

    Pgf90 having a build in affinity, which is similar to ifort with the normal par-affinity option. You can also use KMP-affinity environment variables instead of using that, though the par-affinity option will not provide you any run-time option. I respect to the size-limit the default limits are more probable with pgf90. The kmp-stacksize is used to control the size limit with the function call or environment variable. The default for both 32 and 64 bit computer are 2MB and 4MB respectively.
    you know you've made it big on here when you have your own imposter

  6. #6
    Join Date
    Sep 2010
    Posts
    47

    Re: Compiling Hydrodynamic Model using ifort on Intel Quad-Core

    Thank you all for the responses, these helps me very much. I set to KMP_STACKSIZE and all necessary configurations to maximum, as I have a lot of memory space. But the main issue is not for stack size. But I haven’t played with affinity yet but tried for variables. It continues to the main function and get the thread checker and then post the output. I greatly appreciate all, to giving me such nice solutions and other ideas

  7. #7
    Join Date
    Jan 2006
    Posts
    3,792

    Re: Compiling Hydrodynamic Model using ifort on Intel Quad-Core

    I had a this problem in my computer, after that I used the Fortran code which help me to overcome from the problem. This is an line coding for checking the thread notes. You can try this one in your issue, it may help you.
    Code:
    !
    DO IK=1, NK
    !
    !  Initialize energy in band
    !
    AB     = 0.
    ABX    = 0.
    ABY    = 0.
    ABXX   = 0.
    ABYY   = 0.
    ABXY   = 0.
    !
    ! Integrate energy in band
    !
    DO ITH=1, NTH
    !$OMP PARALLEL DO PRIVATE(JSEA)
    DO JSEA=1, NSEAL
    AB (JSEA)  = AB (JSEA) + A(ITH,IK,JSEA)
    ABX(JSEA)  = ABX(JSEA) + A(ITH,IK,JSEA)*ECOS(ITH)
    ABY(JSEA)  = ABY(JSEA) + A(ITH,IK,JSEA)*ESIN(ITH)
    ISEA         = JSEA                                                                        <line 286
    FACTOR     = MAX ( 0.5 , CG(IK,ISEA)/SIG(IK)*WN(IK,ISEA) )              <line 287
    ABXX(JSEA) = ABXX(JSEA) + ((1.+EC2(ITH))*FACTOR-0.5) *    &
    A(ITH,IK,JSEA)
    ABYY(JSEA) = ABYY(JSEA) + ((1.+ES2(ITH))*FACTOR-0.5) *    &
    A(ITH,IK,JSEA)
    ABXY(JSEA) = ABXY(JSEA) + ESC(ITH)*FACTOR * A(ITH,IK,JSEA)        <line 292
    END DO
    END DO
    !
    ! Finalize integration over band and update mean arrays
    !
    !$OMP PARALLEL DO PRIVATE(JSEA,ISEA,FACTOR)
    DO JSEA=1, NSEAL
    ISEA         = JSEA
    FACTOR       = DDEN(IK) / CG(IK,ISEA)
    EBD(IK,JSEA) = AB(JSEA) * FACTOR
    ET (JSEA)    = ET (JSEA) + EBD(IK,JSEA)
    EWN(JSEA)    = EWN(JSEA) + EBD(IK,JSEA) / WN(IK,ISEA)
    ETR(JSEA)    = ETR(JSEA) + EBD(IK,JSEA) / SIG(IK)
    ETX(JSEA)    = ETX(JSEA) + ABX(JSEA) * FACTOR
    ETY(JSEA)    = ETY(JSEA) + ABY(JSEA) * FACTOR
    FKD    = MAX ( 0.001 , WN(IK,ISEA) * DW(ISEA) )                           <line 308
    IF ( FKD .LT. 6. ) THEN
    FKD       = FACTOR / SINH(FKD)**2                                              <line 310
    ABR(JSEA) = ABR(JSEA) + AB(JSEA) * FKD
    ABA(ISEA) = ABA(ISEA) + ABX(JSEA) * FKD
    ABD(ISEA) = ABD(ISEA) + ABY(JSEA) * FKD
    UBR(JSEA) = UBR(JSEA) + AB(JSEA) * SIG(IK)**2 * FKD
    UBA(ISEA) = UBA(ISEA) + ABX(JSEA) * SIG(IK)**2 * FKD
    UBD(ISEA) = UBD(ISEA) + ABY(JSEA) * SIG(IK)**2 * FKD                 <line 316
    END IF
    ABXX(JSEA)   = MAX ( 0. , ABXX(JSEA) ) * FACTOR
    ABYY(JSEA)   = MAX ( 0. , ABYY(JSEA) ) * FACTOR
    ABXY(JSEA)   = ABXY(JSEA) * FACTOR
    SXX(ISEA)    = SXX(ISEA)  + ABXX(JSEA)
    SYY(ISEA)    = SYY(ISEA)  + ABYY(JSEA)
    SXY(ISEA)    = SXY(ISEA)  + ABXY(JSEA)
    EBD(IK,JSEA) = EBD(IK,JSEA) / DSII(IK)
    END DO
    !

  8. #8
    Join Date
    May 2008
    Posts
    2,464

    Re: Compiling Hydrodynamic Model using ifort on Intel Quad-Core

    You need to declare some variables in your Private clause in the loop, which you missed in the coding part. It the cause for the sharing default. In each thread a local register is created with the help of compiler optimization. In according to Open MP, the DO parameter is the default private clause, even simple to copies of the private variable.

Similar Threads

  1. Intel Core 2 Duo E8400 vs. Intel Core 2 Quad Q9300
    By Scottish in forum Motherboard Processor & RAM
    Replies: 10
    Last Post: 03-04-2012, 05:30 AM
  2. Replies: 5
    Last Post: 26-03-2012, 03:26 PM
  3. Need information about Intel Core i7-875K 2.93GHz Quad-Core Processor
    By Hunter-Man in forum Motherboard Processor & RAM
    Replies: 3
    Last Post: 16-04-2011, 04:50 PM
  4. Comparison between AMD quad core v/s Intel quad core
    By Mahendra varma in forum Motherboard Processor & RAM
    Replies: 3
    Last Post: 17-07-2009, 11:21 AM
  5. Intel Core 2 Duo E8600 vs. Intel Core 2 Quad Q9650
    By K88 in forum Motherboard Processor & RAM
    Replies: 4
    Last Post: 24-04-2009, 11:41 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,221,672.51939 seconds with 17 queries