資源簡介
這是vasp4.6軟件包,有代碼,有說明文檔和一些講義,代碼沒有驗證過,哪位仁兄下載了驗證下。
代碼片段和文件信息
/*****************************************************************
??????FORTRAN?interface?to?get?user-time?and?real?time?on
??????AIX-system?might?work?on?other?UNIX?systems?as?well
??????(must?work?on?all?BSDish?systems?and?SYSVish?systems
??????with?BSD-compatibility?timing?routines?...)!?
*****************************************************************/
#ifndef?NULL
#define?NULL????((void?*)0)
#endif
#include?
#include?
void?vtime(vputimcputim)
double??*vputim*cputim;
{
????????int????gettimeofday();
????????int????getrusage();
????????struct?rusage?ppt;
????????struct?rusage?cpt;
????????struct?timeval?tputps;
????????struct?timeval?tcutcs;
????????struct?timeval?now;
????????int????ierr;
????????ierr?=?getrusage(RUSAGE_SELF&ppt);
????????tpu??=?ppt.ru_utime;
????????tps??=?ppt.ru_stime;
????????ierr?=?getrusage(RUSAGE_CHILDREN&cpt);
????????tcu??=?cpt.ru_utime;
????????tcs??=?cpt.ru_stime;
????????ierr?=?gettimeofday(&nowNULL);
????????*vputim=((double)?tpu.tv_sec)?+?((double)?tpu.tv_usec)?/?1e6?+
????????????????((double)?tps.tv_sec)?+?((double)?tps.tv_usec)?/?1e6?+
????????????????((double)?tcu.tv_sec)?+?((double)?tcu.tv_usec)?/?1e6?+
????????????????((double)?tcs.tv_sec)?+?((double)?tcs.tv_usec)?/?1e6;
????????*cputim=((double)?now.tv_sec)?+?((double)?now.tv_usec)?/?1e6;
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件?????858303??2006-06-16?19:02??vasp1.pdf
-----------?---------??----------?-----??----
???????????????858303????????????????????1
評論
共有 條評論