Re: who can help me? about OpenMP
- From: Randy <joe@xxxxxxxxxxxxxxx>
- Date: 19 Dec 2005 08:48:17 -0700
I know nothing about how Intel has implemented their compiler on
Windows. Your best source of info on that is the Intel Fortran
documents at the URL I mentioned below. You also might want to look
through the Intel Developer website for info on using their compiler
with OpenMP:
Intel® Fortran Compiler for Windows & Visual Fortran
http://softwareforums.intel.com/ids/board?board.id=5
I know nothing about Visual Studio either. I suggest you search for
"openmp" in comp.lang.fortran at http://groups.google.com or post your
Windows fortran questions to that newsgroup.
Try removing the line "USE OMP_LIB" from your code to see what happens.
In Linux, no F90 module is required for OpenMP. That certainly seems
to be the source of your current error message.
Sorry I can't be more helpful.
Randy
rotarywing@xxxxxxxxx wrote:
> Randy wrote:
>>rotarywing@xxxxxxxxx wrote:
>>> I begin to learn something about OpenMP. But I am so confused about
>>>how to start a fortran program using OpenMP. I have installed MS visual studio
>>>.net and
>>>Intel fortran compiler 9.0 on my PC. I have learned that there still is
>>>something else I need to begin coding,but I am not clear. Could someone
>>>help? How and Where can I get that necessary stuff?
>>
>>If you have Intel Fortran 9.0, you should be set to go. I assume the
>>Windows version supports OpenMP. The Intel product web page indicates
>>that it does.
>>
>>To find out, compile using the OpenMP command line flag (-openmp), and
>>turn on the OpenMP reports (-opt_report or -openmp_report2). For
>>example, in Linux, use:
>>
>>$ ifort -openmp -opt_report foo.f90
>>
>>When you run, you'll need to specify the number of threads to run.
>>Usually that's done by setting a Unix shell environment variable:
>>export OMP_NUM_THREADS=2. I don't know how you do this sort of thing
>>in Windows.
>>
>>For more information, get Intel's documentation for their Fortran
>>compiler. It's free.
>>
>>http://www.intel.com/cd/software/products/asmo-na/eng/compilers/219762.htm
>>
>>For more background on OpenMP as well as example code, visit
>>http://www.openmp.org.
>
>
> hello ,Randy
> Thanks very much for your help. I appreciate your kindness.
> I haved learned some from your words. Those below found in the help of
> the compiler are useful.
> *-----------------------
> To run the Intel® compiler in OpenMP mode, invoke the compiler with
> the -openmp (Linux*) or /Qopenmp (Windows*) option using a command
> structured similar to the following:
>
> Linux ifort -openmp input_file
>
> Windows ifort /Qopenmp input_file
> -------------------------------------------------*
>
> I use the command line and input : ifort /Qopenmp ompt.f90
> My code file ompt.90 as follow:
>
> *-----------------------------------------
> PROGRAM OPMT
> USE OMP_LIB
> INTEGER N
> PARAMETER(N=9)
> INTEGER A(N), B(N), C(N)
> INTEGER I, ID, OMP_GET_THREAD_NUM
>
> A=0
> B=0
>
> !$OMP PARALLEL DO PRIVATE(ID)
> DO I = 1, N
> ID =OMP_GET_THREAD_NUM
> C(I) = A(I) + B(I) + ID
> ENDDO
> !$OMP END PARALLEL DO
> END
>
> -----------------------*
>
>
> But I got the output read below:
>
> *-----------------------------------
> Error in the opening the Library module file.
> ------------------------------------*
>
> So i am so puzzled since i have the code line "USE OMP_LIB " in this
> program,why this error happened? Could you tell me why? Thanks.
>
> Another problem is how can i invoke the compiler with the -openmp
> directly in the MS visual studio .net other than in the command line?
> Hungering for your response.
--
Randy Crawford http://www.ruf.rice.edu/~rand rand AT rice DOT edu
--
.
- Follow-Ups:
- Re: who can help me? about OpenMP
- From: as9390955
- Re: who can help me? about OpenMP
- From: Nick Maclaren
- Re: who can help me? about OpenMP
- References:
- who can help me? about OpenMP
- From: rotarywing@xxxxxxxxx
- Re: who can help me? about OpenMP
- From: Randy
- Re: who can help me? about OpenMP
- From: rotarywing@xxxxxxxxx
- who can help me? about OpenMP
- Prev by Date: Studentships for PhD study in Informatics@Edinburgh
- Next by Date: Re: who can help me? about OpenMP
- Previous by thread: Re: who can help me? about OpenMP
- Next by thread: Re: who can help me? about OpenMP
- Index(es):
Relevant Pages
|