- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have C code like such:
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
main(){
double x[10000];
int i;
srand48(123);
for (i - 0; i<10000; i++){
x = tan(3.0*drand48());
}
}
I compile it with icc:
icc -c rand.c
I link it with ifort:
ifort -nofor-main rand.o -lm
This works with the older ifort 12.0.4 and with gcc 4.4.7, but does not work with ifort 13.0.1
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I get the error "undefined reference to 'simd_drand48_pd64x2'
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You probably need to specify some icc libraries that ifort doesn't link to. I am moving this to the Intel C++ forum where C++ experts can advise you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The library you need is libirng.so. You can link your code with ifrort using the command line:
$ ifort -nofor-main rand.o -lirng
(I tracked this down looking at the symbol table of the binary linked with icc.)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That worked Casey. Thank you for your help!

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page