Re: problem using wrapit

From: David Brown <dbrown_at_nyahnyahspammersnyahnyah>
Date: Mon Apr 07 2014 - 14:26:57 MDT

Hi Dong-mei,
I'm glad to hear you found a workable solution. Just FYI, if you do
WRAPIT -h
you well get an extensive help document that includes the following that is applicable to your situation:

------------------------ Linux Compilers ---------------------------
The default linux fortran compiler is the GNU gfortran compiler. If
your system has one of the supported linux fortran compilers you must
specify which one you want to use by the appropriate command line
option, otherwise the gfortran compiler will be used.
The supported linux fortran compilers are the Portland Group
(pgf90), the Lahey/Fujitsu (lf95), and the g95 compiler (g95),
and the Intel compiler (ifc/ifort).
OPTION: -pg to specify the Portland Group compiler.
OPTION: -lf to specify the Lahey/Fujitsu compiler.
OPTION: -in to specify the Intel compiler.
OPTION: -g95 to specify the g95 compiler.
OPTION: -gf to specify the gfortran compiler.
OPTION: -g77 to specify the old g77 compiler.

 -dave

On Apr 7, 2014, at 1:45 PM, "Dong-mei Xu" <dmxu@ucar.edu> wrote:

> Dave,
> I find on our system, there're there kinds of compield tools with
> gnu,pgi,and intel,as
> /nuist/p/public/app/ncl/6.1.2/gnu/bin/WRAPIT
> /nuist/p/public/app/ncl/6.1.2/gnu/bin/ncl
>
> /nuist/p/public/app/ncl/6.1.2/intel/bin/WRAPIT
> /nuist/p/public/app/ncl/6.1.2/intel/bin/ncl
>
> /nuist/p/public/app/ncl/6.1.2/pgi/bin/WRAPIT
> /nuist/p/public/app/ncl/6.1.2/pgi/bin/ncl
>
> The wrapit does not work with intel and pgi, but it works well with
> the gnu compield ncl and wrapit.
> /nuist/p/public/app/ncl/6.1.2/gnu/bin/WRAPIT ex.f
> /nuist/p/public/app/ncl/6.1.2/gnu/bin/ncl ex.ncl
> I may choose the gnu compiled ones, since it's hard for me to fix the intel compiled one.
> Thanks a lot!
> Best!
> dongmei
>
> On Mon, 7 Apr 2014 12:42:24 -0600
> David Brown <dbrown@ucar.edu> wrote:
>> Hi Dongmei,
>> I am replying off-line until we figure this problem out so as not to overload the ncl-talk list.
>> I searched through the archives. There are several messages that seem to suggest similar problems. They mostly seem to suggest a mismatch between the compilers used to create the .so file and the compilers used to create NCL.
>> It looks like WRAPIT is using the standard gcc environment and compiling a 64 bit version of the shared object, so is the ncl that you are invoking also 64 bit and built with gcc/gfortran?
>> Do you have more than one version of NCL? Where is your NCARG_ROOT pointing?
>> -dave
>> On Apr 7, 2014, at 11:27 AM, "Dong-mei Xu" <dmxu@ucar.edu> wrote:
>>> Hi,dave,
>>> Here is the output when I type WRAPIT -d ex.f.
>>> Thanks!
>>> WRAPIT Version: 120209
>>> OPERATING SYSTEM: Linux
>>> nbits = 64
>>> FORTRAN COMPILER (f90c): gfortran
>>> FORTRAN COMPILER OPTIONS (fopts): -m64 -fPIC -v -c -fno-second-underscore
>>> gcc -fPIC -m64 -c -I/nuist/p/public/app/ncl/6.1.2/intel/include WRAPIT.c
>>> COMPILING ex.f
>>> gfortran -m64 -fPIC -v -c -fno-second-underscore ex.f
>>> Using built-in specs.
>>> Target: x86_64-redhat-linux
>>> Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-ppl --with-cloog --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
>>> Thread model: posix
>>> gcc version 4.4.6 20110731 (Red Hat 4.4.6-3) (GCC)
>>> COLLECT_GCC_OPTIONS='-m64' '-fPIC' '-v' '-c' '-fno-second-underscore' '-mtune=generic'
>>> /usr/libexec/gcc/x86_64-redhat-linux/4.4.6/f951 ex.f -ffixed-form -quiet -dumpbase ex.f -m64 -mtune=generic -auxbase ex -version -fPIC -fno-second-underscore -fintrinsic-modules-path /usr/lib/gcc/x86_64-redhat-linux/4.4.6/finclude -o /tmp/cceJEJp3.s
>>> GNU Fortran (GCC) version 4.4.6 20110731 (Red Hat 4.4.6-3) (x86_64-redhat-linux)
>>> compiled by GNU C version 4.4.6 20110731 (Red Hat 4.4.6-3), GMP version 4.3.1, MPFR version 2.4.1.
>>> GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
>>> COLLECT_GCC_OPTIONS='-m64' '-fPIC' '-v' '-c' '-fno-second-underscore' '-mtune=generic'
>>> as -V -Qy --64 -o ex.o /tmp/cceJEJp3.s
>>> GNU assembler version 2.20.51.0.2 (x86_64-redhat-linux) using BFD version version 2.20.51.0.2-5.28.el6 20091009
>>> COMPILER_PATH=/usr/libexec/gcc/x86_64-redhat-linux/4.4.6/:/usr/libexec/gcc/x86_64-redhat-linux/4.4.6/:/usr/libexec/gcc/x86_64-redhat-linux/:/usr/lib/gcc/x86_64-redhat-linux/4.4.6/:/usr/lib/gcc/x86_64-redhat-linux/:/usr/libexec/gcc/x86_64-redhat-linux/4.4.6/:/usr/libexec/gcc/x86_64-redhat-linux/:/usr/lib/gcc/x86_64-redhat-linux/4.4.6/:/usr/lib/gcc/x86_64-redhat-linux/
>>> LIBRARY_PATH=/usr/lib/gcc/x86_64-redhat-linux/4.4.6/:/usr/lib/gcc/x86_64-redhat-linux/4.4.6/:/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../lib64/:/lib/../lib64/:/usr/lib/../lib64/:/nuist/p/public/app/netcdf/4.3.0/intel/lib/:/nuist/p/public/app/intel/Compiler/11.1/046/lib/intel64/:/nuist/p/public/app/intel/Compiler/11.1/046/ipp/em64t/lib/:/nuist/p/public/app/intel/Compiler/11.1/046/mkl/lib/em64t/:/nuist/p/public/app/intel/Compiler/11.1/046/tbb/em64t/cc4.1.0_libc2.4_kernel2.6.16.21/lib/:/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../:/lib/:/usr/lib/
>>> COLLECT_GCC_OPTIONS='-m64' '-fPIC' '-v' '-c' '-fno-second-underscore' '-mtune=generic'
>>> SHARED OBJECT NAME (SharedObj): ex.so
>>> LINKER SUFFIX (ld_suffix): WRAPIT.o ex.o -o ex.so
>>> LINKING
>>> gcc -m64 -fPIC -shared WRAPIT.o ex.o -o ex.so -lgfortran
>>> END WRAPIT
>>> dongmei
>>> On Mon, 7 Apr 2014 11:02:10 -0600
>>> David Brown <dbrown@ucar.edu> wrote:
>>>> Can you add the option '-d' to your WRAPIT line and send us the output?
>>>> WRAPIT -d ex.f
>>>> Thanks,
>>>> -dave
>>>> On Apr 7, 2014, at 9:50 AM, "Dong-mei Xu" <dmxu@ucar.edu> wrote:
>>>>> Hi, dear sir or madam,
>>>>> There's something wrong with the wrapit on my system.
>>>>> I tried the simple test case on your website.
>>>>> https://www.ncl.ucar.edu/Document/Tools/WRAPIT.shtml
>>>>> 1.Download ex.f and ex.ncl.
>>>>> 2.Type:
>>>>> WRAPIT ex.f
>>>>> ncl ex.ncl
>>>>> Here is the output:
>>>>> warning:An error occurred loading the external file ./ex.so, file not loaded
>>>>> ./ex.so: undefined symbol: NclGetArgValue
>>>>> warning:error at line 1 in file ex.ncl
>>>>> fatal:syntax error: line 8 in file ex.ncl before or near :
>>>>> EX:
>>>>> ----^
>>>>> fatal:error in statement
>>>>> fatal:Syntax Error in block, block not executed
>>>>> fatal:error at line 11 in file ex.ncl
>>>>> Here is the information when I type uname -a,
>>>>> Linux log08 2.6.32-220.el6.x86_64 #1 SMP Wed Nov 9 08:03:13 EST 2011 x86_64 x86_64 x86_64 GNU/Linux
>>>>> Do you know how to fix this?
>>>>> Thanks very much.
>>>>> Best regards.
>>>>> dongmei
>>>>> _______________________________________________
>>>>> 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 Mon Apr 07 14:27:09 2014

This archive was generated by hypermail 2.1.8 : Tue Apr 15 2014 - 10:45:19 MDT