p3d2tec on Suse with PGI Fortran 90

Creating Tecplot binary data files

Moderators: davetaflin, salter, steve, jprenaud, straton, Chris Idso

AndyR
Newbie
Posts: 5
Joined: Thu Oct 15, 2009 5:38 am
Location: Ronkonkoma NY
Contact:

p3d2tec on Suse with PGI Fortran 90

Postby AndyR » Thu Oct 15, 2009 5:59 am

Folks,
Have worked my way bit by bit (no pun intended) through compile and linkage issues. with p3d2tec with Tec360 2009 on a machine with PGI fortran 90.

I have managed to compile all the fortran manually and get a set of object files. My problem is with linking

I used
pgf90 -r8 -O2 -c XXX.f
for each fortran file

That went fine

I tried to link using
pgf90 number.o p3d2tec.o scan2.o scan4.o Tecplot_io.o upcase.o xyzq_io.o -r8 -O2 -lstdc++ /usr/local/tec360_2008/lib/tecio64.a -o p3d2tec

And I get a series of errors starting with

/usr/local/tec360_2008/lib/tecio64.a(tecxxx.o): In function `std::__simple_alloc<long, std::__default_alloc_template<true> >::deallocate(long*, unsigned long)':
tecxxx.cpp:(.gnu.linkonce.t._ZNSt14__simple_allocIlSt24__default_alloc_templateILb1ELi0EEE10deallocateEPlm+0x28): undefined reference to `std::__default_alloc_template<true>::deallocate(void*, unsigned long)'
/usr/local/tec360_2008/lib/tecio64.a(tecxxx.o): In function `std::__simple_alloc<double, std::__default_alloc_template<true> >::deallocate(double*, unsigned long)':

The remaining errors are all against the tecio64.a library and are similar to the first one

Clearly there is some other library I need to link against.

Any help is appreciated

Thanks
- Andy R

AndyR
Newbie
Posts: 5
Joined: Thu Oct 15, 2009 5:38 am
Location: Ronkonkoma NY
Contact:

Re: p3d2tec on Suse with PGI Fortran 90

Postby AndyR » Thu Oct 15, 2009 6:48 am

Getting a little closer
Based on the sticky thread on PGI fortran on Macs I made some changes.

Not being up on exactly how make works, I am simply doing it manually. So I compile each f or f90 file as below

----------------------------

pgf90 -L/usr/lib/gcc/i586-suse-linux/4.0.2 -r8 -O2 -lm -lstdc++ -lgcc_eh -I /usr/local/tec360_2008/util/tecio /usr/local/tec360_2008/lib/tecio64.a -c number.f
pgf90 -L/usr/lib/gcc/i586-suse-linux/4.0.2 -r8 -O2 -lm -lstdc++ -lgcc_eh -I /usr/local/tec360_2008/util/tecio /usr/local/tec360_2008/lib/tecio64.a -c p3d2tec.f90
pgf90 -L/usr/lib/gcc/i586-suse-linux/4.0.2 -r8 -O2 -lm -lstdc++ -lgcc_eh -I /usr/local/tec360_2008/util/tecio /usr/local/tec360_2008/lib/tecio64.a -c scan2.f
pgf90 -L/usr/lib/gcc/i586-suse-linux/4.0.2 -r8 -O2 -lm -lstdc++ -lgcc_eh -I /usr/local/tec360_2008/util/tecio /usr/local/tec360_2008/lib/tecio64.a -c scan4.f
pgf90 -L/usr/lib/gcc/i586-suse-linux/4.0.2 -r8 -O2 -lm -lstdc++ -lgcc_eh -I /usr/local/tec360_2008/util/tecio /usr/local/tec360_2008/lib/tecio64.a -c Tecplot_io.f90
pgf90 -L/usr/lib/gcc/i586-suse-linux/4.0.2 -r8 -O2 -lm -lstdc++ -lgcc_eh -I /usr/local/tec360_2008/util/tecio /usr/local/tec360_2008/lib/tecio64.a -c upcase.f
pgf90 -L/usr/lib/gcc/i586-suse-linux/4.0.2 -r8 -O2 -lm -lstdc++ -lgcc_eh -I /usr/local/tec360_2008/util/tecio /usr/local/tec360_2008/lib/tecio64.a -c xyzq_io.f90

--------------------
Again no problem, all objects created

and then I link with
---------------------------
pgf90 -L/usr/lib/gcc/i586-suse-linux/4.0.2 -r8 -O2 -lm -lstdc++ -lgcc_eh -I /usr/local/tec360_2008/util/tecio /usr/local/tec360_2008/lib/tecio64.a number.o p3d2tec.o scan2.o scan4.o Tecplot_io.o upcase.o xyzq_io.o -o p3d2tec

And get a more focused set of errors that leads me to believe an object file is not quite right

--------------------------------------------------------------

/usr/bin/ld: skipping incompatible /usr/lib/gcc/i586-suse-linux/4.0.2/libgcc_eh.a when searching for -lgcc_eh
/usr/bin/ld: skipping incompatible /usr/lib/gcc/i586-suse-linux/4.0.2/libgcc.a when searching for -lgcc
/usr/bin/ld: skipping incompatible /usr/lib/gcc/i586-suse-linux/4.0.2/libgcc.a when searching for -lgcc
p3d2tec.o: In function `p3d2tec':
/home/andrew/Shared2/UTILITIES/TEC3P3D/p3d2tec/p3d2tec.f90:288: undefined reference to `tecend110_'
Tecplot_io.o: In function `tecplot_io_module_tecplot_read_':
/home/andrew/Shared2/UTILITIES/TEC3P3D/p3d2tec/Tecplot_io.f90:243: undefined reference to `tecend110_'
Tecplot_io.o: In function `tecplot_io_module_tecplot_write_':
/home/andrew/Shared2/UTILITIES/TEC3P3D/p3d2tec/Tecplot_io.f90:307: undefined reference to `tecend110_'
Tecplot_io.o: In function `tecplot_io_module_tec_header_write_':
/home/andrew/Shared2/UTILITIES/TEC3P3D/p3d2tec/Tecplot_io.f90:1179: undefined reference to `tecini110_'
/home/andrew/Shared2/UTILITIES/TEC3P3D/p3d2tec/Tecplot_io.f90:1200: undefined reference to `tecauxstr110_'
Tecplot_io.o: In function `tecplot_io_module_tec_block_write_':
/home/andrew/Shared2/UTILITIES/TEC3P3D/p3d2tec/Tecplot_io.f90:1797: undefined reference to `teczne110_'
/home/andrew/Shared2/UTILITIES/TEC3P3D/p3d2tec/Tecplot_io.f90:1821: undefined reference to `teczauxstr110_'
/home/andrew/Shared2/UTILITIES/TEC3P3D/p3d2tec/Tecplot_io.f90:1841: undefined reference to `tecdat110_'
/home/andrew/Shared2/UTILITIES/TEC3P3D/p3d2tec/Tecplot_io.f90:1854: undefined reference to `tecdat110_'
/home/andrew/Shared2/UTILITIES/TEC3P3D/p3d2tec/Tecplot_io.f90:1866: undefined reference to `tecdat110_'
/home/andrew/Shared2/UTILITIES/TEC3P3D/p3d2tec/Tecplot_io.f90:1866: undefined reference to `tecdat110_'
/home/andrew/Shared2/UTILITIES/TEC3P3D/p3d2tec/Tecplot_io.f90:1868: undefined reference to `tecdat110_'
Tecplot_io.o:/home/andrew/Shared2/UTILITIES/TEC3P3D/p3d2tec/Tecplot_io.f90:1874: more undefined references to `tecdat110_' follow

-----------------------------------------


Not sure if I did not get a good Tecplot_io object file or if there is still some missing link library or reference required

In the make file which comes with the code the line which compiles xyzq_io seems somewhat different than the rest. Is that a typo? Am I not compiling that routine properly with the commands above??


xyzq_io: xyzq_io.f90 Tecplot_io.f90
$(F90) $(FFLAGS) xyzq_io.f90

Any help is appreciated

Thanks
- Andy R

PS this is one tool that I would like to see in tecplot

AndyR
Newbie
Posts: 5
Joined: Thu Oct 15, 2009 5:38 am
Location: Ronkonkoma NY
Contact:

Re: p3d2tec on Suse with PGI Fortran 90

Postby AndyR » Thu Oct 15, 2009 7:30 am

One step sideways.
Found that we also have g95 on our cluster. I removed the reference to any of the link libs from the compile statements as g95 complains. And I removed the -lgcc_eh reference

I still get undefined reference errors as before

Where is the code supossed to find refs to

tecend110_
tecdat110_

etc.

Is the underscore telling me something?


Within p3d2tec.f90 and Tecplot_io.f90 there appear to be references to

TecEnd110
TecDat110

etc. In Tecplot_io.f90 there are referenced as external

Hmmm...

Is there some compile flag missing or is there something about

AndyR
Newbie
Posts: 5
Joined: Thu Oct 15, 2009 5:38 am
Location: Ronkonkoma NY
Contact:

Re: p3d2tec on Suse with PGI Fortran 90

Postby AndyR » Thu Oct 15, 2009 7:46 am

Is my source out of date?? I poked around in the util directory and found a tecio.inc file and all the functions in there end in 112 not 110.

Do I need a more upto date p3d2tec file?? I downloaded it from the tecplot forum site??

Hmmm

Any help appreciated
-ANdy

AndyR
Newbie
Posts: 5
Joined: Thu Oct 15, 2009 5:38 am
Location: Ronkonkoma NY
Contact:

Re: p3d2tec on Suse with PGI Fortran 90

Postby AndyR » Thu Oct 15, 2009 7:53 am

Ok just for giggles I eddited all the 110s to be 112s Still no joy

The web page for this addon says it has been tested in 2009.

Anyone out there actually used this with 360_2009 or 08 libraries?

Thanks
- Andy

User avatar
davetaflin
Tecplot Employee
Posts: 11
Joined: Tue Aug 28, 2007 8:14 am
Location: Seattle, WA
Contact:

Re: p3d2tec on Suse with PGI Fortran 90

Postby davetaflin » Fri Oct 16, 2009 8:12 am

Andy,

I think the key bit of information here is the presence in your object code of mixed-case symbols such as TecEnd110. PGI Fortran by default translates all symbols to lower-case, and appends an underscore. If it were doing that with your code, this symbol would have been tecend110_, and your link should have completed successfully. Possibly related, the PGI Fortran option to inhibit this lower-case translation is the compile option -Mupcase. I did not see this option on your command lines, but you do have a file upcase.f; is that related to this issue?

Dave

jim

Re: p3d2tec on Suse with PGI Fortran 90

Postby jim » Fri Oct 16, 2009 9:09 am

AndyR wrote:The web page for this addon says it has been tested in 2009.
Anyone out there actually used this with 360_2009 or 08 libraries?


The <i>intent</i> was to say data files created by this were readable in future versions of Tecplot. I see where this was confusing and tried to clarify the wording on the addons web page and included a link to the older TecIO library.


Return to “TecIO Library”

Who is online

Users browsing this forum: No registered users and 1 guest