Re: NCL, WRAPIT and OpenMP, (Oh My!)

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Wed Mar 23 2011 - 09:42:31 MDT

Hi William,

The default WRAPIT does not pull in OMP libraries, but you can add any libraries you want on the WRAPIT line yourself.

For example, if the library is called "libomp.a" and is in "/usr/local/lib", then you could do something like this:

WRAPIT -L /usr/local/lib -l omp semivar_2d90.stub semivar_2d.f90

If you need WRAPIT to use special compilers or compiler options, then you will have to modify WRAPIT directly to do so.

You can modify WRAPIT with any UNIX editor, and then look for "f90c" for setting the Fortran compiler. This is set differently depending on what kind of system you're on, so you'll need to look at the nearby comments to see which block of code to modify "f90c" in. Look at the various "case" statements to see which block to modify.

The C compiler will also be set in these blocks. Look for "excopts" and "exfopts" for setting additional compiler options.

Finally, if you are not sure what exactly WRAPIT is doing, then include "-d" on the WRAPIT line. This is turns on "debug" and gives you a bunch of compilation output that can be useful. Sometimes I do this, and then just cut and paste the commands that WRAPIT is using, and create my own shell script to do the compilation myself.

--Mary

On Mar 22, 2011, at 2:57 PM, Capehart, William J wrote:

> 'Fraid it gives me this:
>
>
> First with WRAPIT:
>
> % WRAPIT semivar_2d90.stub semivar_2d.f90
>
> WRAPIT Version: 110125
> COMPILING semivar_2d.f90
> LINKING
> ld: warning: duplicate dylib /usr/lib/libgcc_s.1.dylib
> END WRAPIT
>
> Then with NCL: in which the .so library is IDed as EX01,
>
> % ncl semivariance2.ncl
> Copyright (C) 1995-2011 - All Rights Reserved
> University Corporation for Atmospheric Research
> NCAR Command Language Version 6.0.0-beta
> The use of this software is governed by a License Agreement.
> See http://www.ncl.ucar.edu/ for more details.
> warning:An error occurred loading the external file ./semivar_2d90.so, file not loaded
> dlopen(./semivar_2d90.so, 2): Symbol not found: _omp_get_max_threads_
> Referenced from: /Users/wjc/Desktop/Ardec/semivariance/semivar_2d90.so
> Expected in: flat namespace
> in /Users/wjc/Desktop/Ardec/semivariance/semivar_2d90.so
> warning:error at line 1 in file semivariance2.ncl
>
> fatal:syntax error: line 48 in file semivariance2.ncl before or near :
> EX01:
> ----^
>
> fatal:error in statement
> fatal:Syntax Error in block, block not executed
> fatal:error at line 91 in file semivariance2.ncl
> %
>
> So the default WRAPIT does not seem to have OpenMP ready to go.
>
> ================================================================
> Bill Capehart <William.Capehart@sdsmt.edu> Associate Professor
> Institute of Atmospheric Sciences Department Chair
> 213 Mineral Industries Building
> South Dakota School of Mines and Technology Ph: +1-605-394-1994
> 501 East Saint Joseph Street Fax: +1-605-394-6061
> Rapid City, SD 57701-3995 Mobile: +1-605-484-5692
> =================== http://capehart.sdsmt.edu ==================
>
>
> From: Saji Hameed <saji.nh@gmail.com>
> Date: Sat, 19 Mar 2011 23:37:04 -0600
> To: William Capehart <William.Capehart@sdsmt.edu>
> Cc: "ncl-talk@ucar.edu" <ncl-talk@ucar.edu>
> Subject: Re: NCL, WRAPIT and OpenMP, (Oh My!)
>
> Try and let us know.. if not, fork it as a different process with system command....
>
> saji
> --
>
> On Sun, Mar 20, 2011 at 9:50 AM, Capehart, William J <William.Capehart@sdsmt.edu> wrote:
>> Can OpenMP be used with NCL via Wrappit?
>>
>> Just wonderin' (and probably more than a little crazy)
>> ================================================================
>> Bill Capehart <William.Capehart@sdsmt.edu> Associate Professor
>> Institute of Atmospheric Sciences Department Chair
>> 213 Mineral Industries Building
>> South Dakota School of Mines and Technology Ph: +1-605-394-1994
>> 501 East Saint Joseph Street Fax: +1-605-394-6061
>> Rapid City, SD 57701-3995 Mobile: +1-605-484-5692
>> =================== http://capehart.sdsmt.edu ==================
>>
>> _______________________________________________
>> ncl-talk mailing list
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Mar 23 09:42:43 2011

This archive was generated by hypermail 2.1.8 : Wed Mar 23 2011 - 16:15:59 MDT