michael wrote:
Kamaraju Kusumanchi wrote:

yes I did all this! it's the C++ that seems to be causing problems when
looking for header files (eg I compiled up all of mpich without problem)



Ok. How about -cxxlib-icc option then?

$cat sizes.cpp
#include <iostream>

using namespace std;

int main() {
 cout << sizeof(char) << "\n";
 cout << sizeof(int) << "\n";
 cout << sizeof(float) << "\n";
 cout << sizeof(double) << "\n";
}

$icc -I /opt/intel_cc_80/include/c++/ -cxxlib-icc sizes.cpp

$./a.out
1
4
4
8

Dont know if it works for you. But worth giving a try.

raju




Raju et al - here's what I get (below)... ie by adding -cxxlib-icc (no need for the -I/...intel.../lib) it does indeed work. So what is this telling us? I guess it's saying all the stuff is there but plain 'icc' doesn't know where to look (but I thought it should!)

Michael

[EMAIL PROTECTED]:/tmp$ icc sizes.cpp
sizes.cpp(1): catastrophic error: could not open source file "iostream"
 #include <iostream>
                    ^

compilation aborted for sizes.cpp (code 4)
[EMAIL PROTECTED]:/tmp$ icc -cxxlib-icc sizes.cpp
[EMAIL PROTECTED]:/tmp$ ./a.out
1
4
4
8
[EMAIL PROTECTED]:/tmp$





Arh, it's worse than we thought Jim: it's not just header files but more than seems to be broken, as shown by this linking stage:


icc -o nctst -g -O2 -Vaxlib nctst.o libnetcdf_c++.a -L../libsrc -lnetcdf
icc: Command line warning: ignoring option '-V'; no argument required
nctst.o(.text+0x4d): In function `gen(char const*, int)':
/opt/intel_cc_80/include/c++/xlocnum:1088: undefined reference to `std::cerr'
nctst.o(.text+0x335): In function `gen(char const*, int)':
/opt/intel_cc_80/include/c++/ostream:212: undefined reference to `std::cerr'
nctst.o(.text+0x44f): In function `dumpatts(NcVar&)':
/home/michael/src/netcdf-3_6_0-beta6/src/cxx/nctst.cpp:155: undefined reference
to `std::cout'
nctst.o(.text+0x491):/home/michael/src/netcdf-3_6_0-beta6/src/cxx/nctst.cpp:157: undefined reference to `std::cout'




--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Reply via email to