Topic
IC4NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
2 replies Latest Post - ‏2013-05-03T07:17:46Z by eile
eile
eile
2 Posts
ACCEPTED ANSWER

Pinned topic EINVAL with gpfs_fcntl?

‏2013-04-22T08:46:56Z |

I'm trying to use prefetching hints on an IO-heavy code. I set up the code according to my understanding of the man page of gpfs_fcntl(), but do get an EINVAL. I'm a bit lost now what I'm doing wrong - any hints are appreciated.

Mount: /dev/bgqhome on /bghome type gpfs (rw,dev=cadmos-gss.gss1a:bgqhome,ldev=bgqhome)

 

Error: Prefetch using gpfs_fcntl failed: Invalid argument (22), 32768b at 7713095680 from /bgscratch/bbp/l5/release/2012.07.23/circuit/SomatosensoryCxS1-v4.lowerCellDensity.r151/O1/merged_circuit/ncsFunctionalAllRecipePathways/SYNAPSE_payload.dat

File: -rw-rw-r-- 1 delalond bbp 14739308544 Jul 25  2012 /bgscratch/bbp/l5/release/2012.07.23/circuit/SomatosensoryCxS1-v4.lowerCellDensity.r151/O1/merged_circuit/ncsFunctionalAllRecipePathways/SYNAPSE_payload.dat

Source:

void BufferedFile::prefetch( const uint64_t offset, const uint64_t size )

{

   if( file_.fd == -1 )

       file_.fd = ::open( filename.c_str(), O_RDONLY );

   if( file_.fd == -1 )

   {

       LBWARN << "open() failed: " << lunchbox::sysError << std::endl;

       return;

   }

   struct

   {

       gpfsFcntlHeader_t hdr;

       gpfsAccessRange_t acc;

   } arg;

   arg.hdr.totalLength = sizeof(arg);

   arg.hdr.fcntlVersion = GPFS_FCNTL_CURRENT_VERSION;

   arg.hdr.fcntlReserved = 0;

   arg.acc.structLen = sizeof(arg.acc);

   arg.acc.structType = GPFS_ACCESS_RANGE;

   arg.acc.start = offset;

   arg.acc.length = size;

   arg.acc.isWrite = 0;

   if( gpfs_fcntl( file_.fd, &arg ) != 0 )

        LBWARN << "Prefetch using gpfs_fcntl failed: " << lunchbox::sysError

               << ", " << size << "b at " << offset << " from " << filename

               << std::endl;

}

 

 

  • dichung
    dichung
    11 Posts
    ACCEPTED ANSWER

    Re: EINVAL with gpfs_fcntl?

    ‏2013-05-02T18:50:56Z  in response to eile

    Can you clarify your environment?

    You said you mounted file system to /bghome and tried to open file under /bgscratch.

    /bgscratch/bbp/l5/release/2012.07.23/circuit/SomatosensoryCxS1-v4.lowerCellDensity.r151/O1/merged_circuit/ncsFunctionalAllRecipePathways/SYNAPSE_payload.dat

    Is /bgscratch GPFS file system?

     

    • eile
      eile
      2 Posts
      ACCEPTED ANSWER

      Re: EINVAL with gpfs_fcntl?

      ‏2013-05-03T07:17:46Z  in response to dichung

      Environment: RHEL 6.3, gpfs mounted through a 10GBit interface.

      Mount: I mistakenly picked the wrong mount. Here is the correct one:

       

      Mount: /dev/scratch16 on /bgscratch type gpfs (rw,dev=cadmos-gss.gss1a:scratch16,ldev=scratch16)