Direct I/O possible with Cray compiler?

37 views Asked by At

I am trying to compile a C code that uses direct I/O. There is one line that uses the O_DIRECT flag:

fd = open(fileName,O_DIRECT | O_RDWR | O_CREAT,0600)

Intel and GNU understand this just fine and compile. Cray cannot get past O_DIRECT. It does not think it is set anywhere. Does the Cray compiler have some alternative for this variable? Or can it just not do direct I/O?

1

There are 1 answers

0
bob.sacamento On

Give the compiler command the -D'_GNU_SOURCE' flag. It will allow it to pick some things, mainly O_DIRECT, in the header file /usr/include/bits/fcntl-linux.h that it won't pick up otherwise.