• Upgrade your Internet Experience
  • Sign in
  • Microsoft.com
  • United States (English)
    Brasil (Português)Česká republika (Čeština)Deutschland (Deutsch)España (Español)France (Français)Italia (Italiano)Россия (Русский)대한민국 (한국어)中华人民共和国 (中文)台灣 (中文)日本 (日本語)香港特别行政區 (中文)
 
 
Resources for IT Professionals
 
 
 
Resources for IT Professionals > Forums Home > Windows HPC (High Performance Computing) Forums > Windows HPC Server Developers - General > How to link Fortran with the HPC Pack SDK?
Ask a questionAsk a question
Search Forums:
  • Search Windows HPC Server Developers - General Forum Search Windows HPC Server Developers - General Forum
  • Search All Windows HPC (High Performance Computing) Forums Search All Windows HPC (High Performance Computing) Forums
  • Search All Microsoft Forums Search All Microsoft Forums
 

AnswerHow to link Fortran with the HPC Pack SDK?

  • Sunday, March 16, 2008 11:58 AMMarty Humphrey Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Vote As Helpful
    0

     

    Hi -- I don't think this is specific to the particular compiler/linker I'm using (PGI)...maybe..

     

    We are having difficulties linking Fortran with the new HPC Pack SDK, we can't find any documentation/examples for this.

     

    Here's my link line for the CCS SDK. This link line works.

     

    PGI$ pgf95 -I"c:\program files\microsoft compute cluster pack\include" Halo.f "c:\program files\microsoft compute cluster pack\lib\amd64\msmpi.lib"

     

    We can't figure out what the corresponding link line might be for the HPC Pack SDK. The following line doesn't work because there are many unresolved symbols (e.g., mpi_init_)

     

    PGI$ pgf90 -I"c:\program files\microsoft HPC Pack SDK\include" Halo.f "c:\program files\microsoft HPC Pack SDK\lib\amd64\msmpi.lib"

     

    What are the other two libraries in c:\program files\microsoft HPC Pack SDK\lib\amd64 for? Adding either of them to the link line appears like progress, but then we get the error "LINK : fatal error LNK1104: cannot open file 'ifconsol.lib'"

     

    thanks,

    Marty

     

     

     

    • ReplyReply
    • QuoteQuote
     

Answers

  • Monday, March 24, 2008 5:18 PMLioMSFTUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Vote As Helpful
    1

     

    Hi Marty,

     

    adding -nodefaultlib did work for me (but probably because I'm using the ms linker).

    please try adding -nodefaultlib=ifconsol (or ifconsol.lib).

     

    btw: this is fixed for the upcomming beta2

     

    thanks,

    .Erez

    • Marked As Answer byJosh BarnardMSFT, OwnerThursday, March 26, 2009 12:35 AM
    •  
    • ReplyReply
    • QuoteQuote
     

All Replies

  • Monday, March 17, 2008 8:36 PMLioMSFTUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Vote As Helpful
    0

    Hi Marty,
     
    Yes using the new Fortran static libraries is the way to go. I'm sorry for the lack of documentation we will have the information posted soon.
     
    You uncovered a problem with the static library, I will fix that for beta 2. To overcome this problem please add “-nodefaultlib” to your link line.

     

    One of the msmpif*.lib is required on the link line in addition to msmpi.lib.
    The msmpifec.lib supports compiling where the fortran compiler puts string length at the end of the parameter stack (most common case).
    The msmpifms.lib supports compiling where the Fortran compilers puts the string length right after the string pointer on the parameter stack (mixed).

     

    Hope this helps,

    .Erez

    • ReplyReply
    • QuoteQuote
     
  • Monday, March 17, 2008 10:42 PMliweip Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Vote As Helpful
    0

    Hi Marty,

     

    the following is the Makefile I used to compile MPI fortran code using pgi 7.0.4.

     

    PGIDIR=d:\hpctest\public\ext\bin\PGI\win64\7.1-3
    FC=$(PGIDIR)\bin\pgf95.exe
    LICENSE_SERVER=27003@hpcisvlicsrv

     

    #for VS2005
    #VCDIR=$(VCINSTALLDIR)
    #VCSDKDIR=$(VCINSTALLDIR)

     

    #for VS2008
    VCSDKDIR=C:\Program Files\\Microsoft SDKs\Windows\v6.0A\Lib\x64
    VCDIR=C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\lib\amd64

    FCFLAGS= -I "$(CCP_INC)amd64" -Mpreprocess -Mnoupcase -DUSE_FORT_CDECL
    LDFLAGS=/nologo /NODEFAULTLIB /entry:mainCRTStartup /subsystem:console

     

    PGFLIBS=\
        $(PGIDIR)\lib\pg.lib \
        $(PGIDIR)\lib\pgimainxx.obj \
        $(PGIDIR)\lib\f90main.obj \
        $(PGIDIR)\lib\pgf90.lib \
        $(PGIDIR)\lib\libpgf90_rpm1.lib \
        $(PGIDIR)\lib\libpgf902.lib \
        $(PGIDIR)\lib\libpgf90rtl.lib \
        $(PGIDIR)\lib\pgftnrtl.lib \
        $(PGIDIR)\lib\pgc.lib \
        $(PGIDIR)\lib\libnspgc.lib \


    UMLIBS=\
      "$(CCP_LIB64)msmpi.lib" \
      "$(CCP_LIB64)msmpifec.lib" \
      "$(VCSDKDIR)\uuid.lib" \
      "$(VCSDKDIR)\kernel32.lib" \
      "$(VCDIR)\libcmt.lib" \
      "$(VCSDKDIR)\dbghelp.lib"

     

    allStick out tonguei.exe

    pi.exe: pi.obj
     link.exe $(LDFLAGS) -outStick out tonguei.exe pi.obj $(UMLIBS) $(PGFLIBS)

    pi.obj: pi.f90
     @set LM_LICENSE_FILE=$(LICENSE_SERVER)
     $(FC) $(FCFLAGS) -c pi.f90

    clean:
     del pi.obj pi.exe*

    Please let me know if it doesn't work for you.

    Liwei

    • ReplyReply
    • QuoteQuote
     
  • Tuesday, March 18, 2008 2:13 PMMarty Humphrey Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Vote As Helpful
    0

    Hi Erez,

     

    thanks for the response! Unfortunately, this doesn't appear to work:

     

    PGI$ pgf90 -I"c:\program files\microsoft HPC Pack SDK\include" Halo.f "c:\program files\microsoft HPC Pack SDK\lib\amd64\msmpi.lib" "c:\program files\microsoft hpc pack sdk\lib\amd64\msmpifec.lib" -nodefaultlib


    pgf90-Error-Switch -nodefaultlib expects an argument

    -nodefaultlib=<lib> Passed to linker; remove library name to library search list

    thanks,

    Marty

     

    • ReplyReply
    • QuoteQuote
     
  • Saturday, March 22, 2008 7:07 PMLioMSFTUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Vote As Helpful
    0

     

    Interesting, it did work for me (but I was using a different linker)

    what version are you using?

    how about -nodefaultlib='ifconsol (or 'ifconsol.lib)

     

    thanks,

    .Erez

    • ReplyReply
    • QuoteQuote
     
  • Monday, March 24, 2008 12:04 AMLioMSFTUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Vote As Helpful
    0

    what version are you using? (It did work for me, probably because I'm using ms linker).

    Please try using -defaultlib=ifconsol (or ifconsol.lib).

     

    thanks,

    .Erez

     

    • ReplyReply
    • QuoteQuote
     
Need Help with Forums? (FAQ)
 
© 2009 Microsoft Corporation. All rights reserved.
Manage Your Profile
|
Contact Us
|
Newsletter
|
Terms of Use
|
Trademarks
|
Privacy Statement