Re: [netcdfgroup] Two installations of netcdf

What David said. And you can use the nc-config script in the bin subdirectory 
of each installed version to return information about the compiler, include 
files and linker commands. That's if you're using netCDF 4.x (and why wouldn't 
you?)

-----Original Message-----
From: netcdfgroup-bounces@xxxxxxxxxxxxxxxx 
[mailto:netcdfgroup-bounces@xxxxxxxxxxxxxxxx] On Behalf Of David W. Pierce
Sent: Wednesday, 30 January 2013 06:00
To: Syed Ahsan Ali Bokhari
Cc: NetCDF Group List
Subject: Re: [netcdfgroup] Two installations of netcdf

A common way of handling this at data centers is to use the modules package:

http://modules.sourceforge.net/

If you don't want to go to the effort of using that, then you can do the 
following:

* When configuring each version of the library, set the --prefix argument to 
indicate a directory directory to install to under that particular location. 
For example, to install both 4.1.3 and 4.2.1.1, here is what I do:

% cd /home/pierce/src/packages/data/netcdf/netcdf-4.1.3
% ./configure 
--prefix=/home/pierce/src/packages/data/netcdf/netcdf-4.1.3/install
 --enable-dap --enable-netcdf-4  --enable-shared % make % make install

% cd /home/pierce/src/packages/data/netcdf/netcdf-4.2.1.1
% ./configure 
--prefix=/home/pierce/src/packages/data/netcdf/netcdf-4.2.1.1/install
 --enable-dap --enable-netcdf-4  --enable-shared % make % make install

You will then have 2 complete installations.

To use the installation you want:

* If compiling: Set the -L (library path) flag correctly. I.e., use something 
like "gcc -L /home/pierce/src/packages/data/netcdf/netcdf-4.1.3/install 
-lnetcdf" or

On Tue, Jan 29, 2013 at 2:42 AM, Syed Ahsan Ali Bokhari <ahsan.pmd@xxxxxxxxx> 
wrote:
> I want to keep two different installations of Netcdf on the same
> system compiled with different compilers, e.g one with ifort and other
> with gfortran. How can I keep the two libraries seperate.
> Thanks
>
> _______________________________________________
> netcdfgroup mailing list
> netcdfgroup@xxxxxxxxxxxxxxxx
> For list information or to unsubscribe,  visit:
> http://www.unidata.ucar.edu/mailing_lists/



--
David W. Pierce
Division of Climate, Atmospheric Science, and Physical Oceanography Scripps 
Institution of Oceanography, La Jolla, California, USA
(858) 534-8276 (voice)  /  (858) 534-8561 (fax)    dpierce@xxxxxxxx

_______________________________________________
netcdfgroup mailing list
netcdfgroup@xxxxxxxxxxxxxxxx
For list information or to unsubscribe,  visit: 
http://www.unidata.ucar.edu/mailing_lists/
--
Please consider the environment before printing this email.
NIWA is the trading name of the National Institute of Water & Atmospheric 
Research Ltd.



  • 2013 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdfgroup archives: