PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

netcdf and SCAM - uses netcdf
Goto page Previous  1, 2
 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling
View previous topic :: View next topic  
Author Message
mkcolg



Joined: 30 Jun 2004
Posts: 6021
Location: The Portland Group Inc.

PostPosted: Mon Sep 08, 2008 4:06 pm    Post subject: Reply with quote

Look for something like "LDFLAG" in the makefile and add "-L/usr/pgi/linux86-64/7.2-5/lib -lpgf90 -lpgf90_rpm1 -lpgf902 -lpgf90rtl -lpgftnrtl -lnspgc -lpgc ". This will include all of PGI's F90 and C runtime libraries. Please change the "-L" to the actual location of you PGI library directory.

- Mat
Back to top
View user's profile
morto



Joined: 23 Sep 2004
Posts: 4

PostPosted: Mon Sep 08, 2008 5:35 pm    Post subject: success with SCAM...mostly Reply with quote

Mat,
Thanks for the help. I got it to compile with the path and library information you provided. There are some font problems with the gui but at least I got this far.

For anyone else who may encounter similar problems, this is what I had to do to get to this point.

I tried defining an environment variable:

export LDFLAG=-L/opt/pgi/linux86-64/7.0-4/lib -lpgf90 -lpgf90_rpm1 -lpgf902 -lpgf90rtl -lpgftnrtl -lnspgc -lpgc

...but the "gcc -o" command still could not find the PGI libs. I tried editing the "Makefile in /usr/local/cam1/models/atm/cam/tools/scam/obj/Makefile" and adding "-L/usr/pgi/linux86-64/7.2-5/lib -lpgf90 -lpgf90_rpm1 -lpgf902 -lpgf90rtl -lpgftnrtl -lnspgc -lpgc " to the "gcc -o" command but same result.

Only after going into:

/usr/local/cam1/models/atm/cam/tools/scam/ui

...and editing "configure":

LINK_LIBS="-L$NETCDF_LIB -lnetcdf $NCARG_LIBS $QTLIB -L/usr/X11R6/lib -lX11 -lm -lXext -ldl -L/opt/pgi/linux86-64/7.0-4/lib -lpgf90 -lpgf90_rpm1 -lpgf902 -lpgf90rtl -lpgftnrtl -ln
spgc -lpgc"

...and re-running "gmake in:

/usr/local/cam1/models/atm/cam/tools/scam

..did the build complete completely.

When running the compiled program "scam", there are fonts missing from the gui so I think I need to similarly edit other "configure" files in the directory tree to correctly reference the PGI libs, but I am now farther than I've been able to get for a while.

Thanks a lot.
-mark
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling All times are GMT - 7 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © phpBB Group