Changes to VT:
- fixed compiler warnings - fixed Coverity warnings - vtrun: - do preload libvt-fmpi.so only if it is available This commit was SVN r25056.
Этот коммит содержится в:
родитель
23f47295a8
Коммит
9f154e7060
@ -48,7 +48,7 @@ AC_DEFUN([ACVT_RUN],
|
|||||||
VT_RUN_VTMPILIB="libvt-mpi$SHREXT"
|
VT_RUN_VTMPILIB="libvt-mpi$SHREXT"
|
||||||
VT_RUN_VTMTLIB="libvt-mt$SHREXT"
|
VT_RUN_VTMTLIB="libvt-mt$SHREXT"
|
||||||
VT_RUN_VTHYBLIB="libvt-hyb$SHREXT"
|
VT_RUN_VTHYBLIB="libvt-hyb$SHREXT"
|
||||||
VT_RUN_FMPILIB="libvt-fmpi$SHREXT"
|
AS_IF([test x"$build_fmpiwraplib" = "xyes"], [VT_RUN_FMPILIB="libvt-fmpi$SHREXT"])
|
||||||
VT_RUN_DYNATTLIB="libvt-dynatt$SHREXT"
|
VT_RUN_DYNATTLIB="libvt-dynatt$SHREXT"
|
||||||
|
|
||||||
build_vtrun=yes
|
build_vtrun=yes
|
||||||
|
@ -39,11 +39,11 @@ __VT_EXTERN_DECL void VT_User_end_id__(unsigned int rid);
|
|||||||
template<> inline VT_Tracer<sizeof(int)>::~VT_Tracer() { VT_User_end__(n); }
|
template<> inline VT_Tracer<sizeof(int)>::~VT_Tracer() { VT_User_end__(n); }
|
||||||
|
|
||||||
template<> struct VT_Tracer<1> {
|
template<> struct VT_Tracer<1> {
|
||||||
VT_Tracer(unsigned int r, const char* f = 0, int l = 0) __VT_NOINST_ATTR;
|
VT_Tracer(unsigned int r, const char*, int) __VT_NOINST_ATTR;
|
||||||
~VT_Tracer() __VT_NOINST_ATTR;
|
~VT_Tracer() __VT_NOINST_ATTR;
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
};
|
};
|
||||||
inline VT_Tracer<1>::VT_Tracer(unsigned int r, const char* f, int l)
|
inline VT_Tracer<1>::VT_Tracer(unsigned int r, const char*, int)
|
||||||
: i(r) { VT_User_start_id__(i); }
|
: i(r) { VT_User_start_id__(i); }
|
||||||
inline VT_Tracer<1>::~VT_Tracer() { VT_User_end_id__(i); }
|
inline VT_Tracer<1>::~VT_Tracer() { VT_User_end_id__(i); }
|
||||||
#endif /* __cplusplus */
|
#endif /* __cplusplus */
|
||||||
|
@ -129,7 +129,8 @@ void OMPragmaF::remove_empties() {
|
|||||||
string::size_type c = lines[lastline].find('!', s);
|
string::size_type c = lines[lastline].find('!', s);
|
||||||
if ( c != string::npos ) --c;
|
if ( c != string::npos ) --c;
|
||||||
string::size_type amp = lines[lastline].find_last_not_of(" \t", c);
|
string::size_type amp = lines[lastline].find_last_not_of(" \t", c);
|
||||||
if ( lines[lastline][amp] == '&' ) lines[lastline][amp] = ' ';
|
if ( amp != string::npos && lines[lastline][amp] == '&' )
|
||||||
|
lines[lastline][amp] = ' ';
|
||||||
|
|
||||||
// remove trailing comma
|
// remove trailing comma
|
||||||
amp = lines[lastline].find_last_not_of(" \t", c);
|
amp = lines[lastline].find_last_not_of(" \t", c);
|
||||||
|
@ -1154,43 +1154,46 @@ std::string HooksTdbC::MasterDataC::intToHex( int i ) {
|
|||||||
|
|
||||||
std::string HooksTdbC::MasterDataC::safeCwd() {
|
std::string HooksTdbC::MasterDataC::safeCwd() {
|
||||||
|
|
||||||
|
std::string ret;
|
||||||
|
|
||||||
int max_path = 4096;
|
int max_path = 4096;
|
||||||
char *buf = new char[max_path];
|
char *buf = new char[max_path];
|
||||||
|
|
||||||
while( 1 ) {
|
while( 1 ) {
|
||||||
|
|
||||||
if( ! getcwd( buf, max_path ) ) {
|
if( ! getcwd( buf, max_path ) ) {
|
||||||
|
|
||||||
if( errno == ERANGE ) {
|
if( errno == ERANGE ) {
|
||||||
|
|
||||||
/* buf is too small */
|
/* buf is too small */
|
||||||
|
|
||||||
/* resize buf and try again */
|
/* resize buf and try again */
|
||||||
max_path += 1024;
|
max_path += 1024;
|
||||||
|
|
||||||
delete [] buf;
|
delete [] buf;
|
||||||
buf = new char[max_path];
|
buf = new char[max_path];
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
/* an error occurred */
|
||||||
|
break;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
/* an error occurred */
|
/* all right */
|
||||||
|
ret= buf;
|
||||||
delete [] buf;
|
break;
|
||||||
return NULL;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
|
||||||
|
|
||||||
/* all right */
|
|
||||||
|
|
||||||
delete [] buf;
|
|
||||||
return std::string( buf );
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
delete [] buf;
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int HooksTdbC::MasterDataC::setFilepath( std::string file_prefix ) {
|
int HooksTdbC::MasterDataC::setFilepath( std::string file_prefix ) {
|
||||||
|
@ -367,6 +367,7 @@ VT_HYB_SOURCES = \
|
|||||||
$(VT_MT_SOURCES)
|
$(VT_MT_SOURCES)
|
||||||
|
|
||||||
VT_JAVA_SOURCES = \
|
VT_JAVA_SOURCES = \
|
||||||
|
vt_jvmti.h \
|
||||||
vt_java.c \
|
vt_java.c \
|
||||||
vt_thrd_java.c
|
vt_thrd_java.c
|
||||||
|
|
||||||
|
@ -169,6 +169,8 @@ char* vt_env_apppath()
|
|||||||
tmp = getenv("VT_APPPATH");
|
tmp = getenv("VT_APPPATH");
|
||||||
if (tmp != NULL && strlen(tmp) > 0)
|
if (tmp != NULL && strlen(tmp) > 0)
|
||||||
{
|
{
|
||||||
|
vt_cntl_msg(2, "VT_APPPATH=%s", tmp);
|
||||||
|
|
||||||
apppath = replace_vars(tmp);
|
apppath = replace_vars(tmp);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -191,6 +193,8 @@ char* vt_env_dyn_shlibs()
|
|||||||
tmp = getenv("VT_DYN_SHLIBS");
|
tmp = getenv("VT_DYN_SHLIBS");
|
||||||
if (tmp != NULL && strlen(tmp) > 0)
|
if (tmp != NULL && strlen(tmp) > 0)
|
||||||
{
|
{
|
||||||
|
vt_cntl_msg(2, "VT_DYN_SHLIBS=%s", tmp);
|
||||||
|
|
||||||
dyn_shlibs = replace_vars(tmp);
|
dyn_shlibs = replace_vars(tmp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -207,6 +211,8 @@ int vt_env_dyn_ignore_nodbg()
|
|||||||
tmp = getenv("VT_DYN_IGNORE_NODBG");
|
tmp = getenv("VT_DYN_IGNORE_NODBG");
|
||||||
if (tmp != NULL && strlen(tmp) > 0)
|
if (tmp != NULL && strlen(tmp) > 0)
|
||||||
{
|
{
|
||||||
|
vt_cntl_msg(2, "VT_DYN_IGNORE_NODBG=%s", tmp);
|
||||||
|
|
||||||
dyn_ignore_nodbg = parse_bool(tmp);
|
dyn_ignore_nodbg = parse_bool(tmp);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -229,6 +235,8 @@ char* vt_env_gnu_nm()
|
|||||||
tmp = getenv("VT_GNU_NM");
|
tmp = getenv("VT_GNU_NM");
|
||||||
if (tmp != NULL && strlen(tmp) > 0)
|
if (tmp != NULL && strlen(tmp) > 0)
|
||||||
{
|
{
|
||||||
|
vt_cntl_msg(2, "VT_GNU_NM=%s", tmp);
|
||||||
|
|
||||||
gnu_nm = replace_vars(tmp);
|
gnu_nm = replace_vars(tmp);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -248,14 +256,16 @@ char* vt_env_gnu_nmfile()
|
|||||||
char* tmp;
|
char* tmp;
|
||||||
|
|
||||||
if (read)
|
if (read)
|
||||||
{
|
{
|
||||||
read = 0;
|
read = 0;
|
||||||
tmp = getenv("VT_GNU_NMFILE");
|
tmp = getenv("VT_GNU_NMFILE");
|
||||||
if (tmp != NULL && strlen(tmp) > 0)
|
if (tmp != NULL && strlen(tmp) > 0)
|
||||||
{
|
{
|
||||||
gnu_nmfile = replace_vars(tmp);
|
vt_cntl_msg(2, "VT_GNU_NMFILE=%s", tmp);
|
||||||
}
|
|
||||||
}
|
gnu_nmfile = replace_vars(tmp);
|
||||||
|
}
|
||||||
|
}
|
||||||
return gnu_nmfile;
|
return gnu_nmfile;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -269,6 +279,8 @@ char* vt_env_gdir()
|
|||||||
tmp = getenv("VT_PFORM_GDIR");
|
tmp = getenv("VT_PFORM_GDIR");
|
||||||
if (tmp != NULL && strlen(tmp) > 0)
|
if (tmp != NULL && strlen(tmp) > 0)
|
||||||
{
|
{
|
||||||
|
vt_cntl_msg(2, "VT_PFORM_GDIR=%s", tmp);
|
||||||
|
|
||||||
gdir = replace_vars(tmp);
|
gdir = replace_vars(tmp);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -289,6 +301,8 @@ char* vt_env_ldir()
|
|||||||
tmp = getenv("VT_PFORM_LDIR");
|
tmp = getenv("VT_PFORM_LDIR");
|
||||||
if (tmp != NULL && strlen(tmp) > 0)
|
if (tmp != NULL && strlen(tmp) > 0)
|
||||||
{
|
{
|
||||||
|
vt_cntl_msg(2, "VT_PFORM_LDIR=%s", tmp);
|
||||||
|
|
||||||
ldir = replace_vars(tmp);
|
ldir = replace_vars(tmp);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -305,17 +319,19 @@ int vt_env_gdir_check()
|
|||||||
char* tmp;
|
char* tmp;
|
||||||
|
|
||||||
if (gdir_check == -1)
|
if (gdir_check == -1)
|
||||||
{
|
|
||||||
tmp = getenv("VT_PFORM_GDIR_CHECK");
|
|
||||||
if (tmp != NULL && strlen(tmp) > 0)
|
|
||||||
{
|
{
|
||||||
gdir_check = parse_bool(tmp);
|
tmp = getenv("VT_PFORM_GDIR_CHECK");
|
||||||
|
if (tmp != NULL && strlen(tmp) > 0)
|
||||||
|
{
|
||||||
|
vt_cntl_msg(2, "VT_PFORM_GDIR_CHECK=%s", tmp);
|
||||||
|
|
||||||
|
gdir_check = parse_bool(tmp);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
gdir_check = 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
gdir_check = 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return gdir_check;
|
return gdir_check;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -325,17 +341,19 @@ int vt_env_ldir_check()
|
|||||||
char* tmp;
|
char* tmp;
|
||||||
|
|
||||||
if (ldir_check == -1)
|
if (ldir_check == -1)
|
||||||
{
|
|
||||||
tmp = getenv("VT_PFORM_LDIR_CHECK");
|
|
||||||
if (tmp != NULL && strlen(tmp) > 0)
|
|
||||||
{
|
{
|
||||||
ldir_check = parse_bool(tmp);
|
tmp = getenv("VT_PFORM_LDIR_CHECK");
|
||||||
|
if (tmp != NULL && strlen(tmp) > 0)
|
||||||
|
{
|
||||||
|
vt_cntl_msg(2, "VT_PFORM_LDIR_CHECK=%s", tmp);
|
||||||
|
|
||||||
|
ldir_check = parse_bool(tmp);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ldir_check = 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
ldir_check = 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return ldir_check;
|
return ldir_check;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -349,6 +367,8 @@ char* vt_env_fprefix()
|
|||||||
tmp = getenv("VT_FILE_PREFIX");
|
tmp = getenv("VT_FILE_PREFIX");
|
||||||
if (tmp != NULL && strlen(tmp) > 0)
|
if (tmp != NULL && strlen(tmp) > 0)
|
||||||
{
|
{
|
||||||
|
vt_cntl_msg(2, "VT_FILE_PREFIX=%s", tmp);
|
||||||
|
|
||||||
fprefix = replace_vars(tmp);
|
fprefix = replace_vars(tmp);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -384,7 +404,11 @@ int vt_env_funique()
|
|||||||
if (tmp != NULL && strlen(tmp) > 0)
|
if (tmp != NULL && strlen(tmp) > 0)
|
||||||
{
|
{
|
||||||
char tmpbuf[128];
|
char tmpbuf[128];
|
||||||
char* p = tmpbuf;
|
char* p;
|
||||||
|
|
||||||
|
vt_cntl_msg(2, "VT_FILE_UNIQUE=%s", tmp);
|
||||||
|
|
||||||
|
p = tmpbuf;
|
||||||
strncpy(tmpbuf, tmp, 128);
|
strncpy(tmpbuf, tmp, 128);
|
||||||
tmpbuf[127] = '\0';
|
tmpbuf[127] = '\0';
|
||||||
while( *p ) { *p = tolower(*p); p++; }
|
while( *p ) { *p = tolower(*p); p++; }
|
||||||
@ -421,6 +445,8 @@ size_t vt_env_bsize()
|
|||||||
tmp = getenv("VT_BUFFER_SIZE");
|
tmp = getenv("VT_BUFFER_SIZE");
|
||||||
if (tmp != NULL && strlen(tmp) > 0)
|
if (tmp != NULL && strlen(tmp) > 0)
|
||||||
{
|
{
|
||||||
|
vt_cntl_msg(2, "VT_BUFFER_SIZE=%s", tmp);
|
||||||
|
|
||||||
buffer_size = parse_size(tmp);
|
buffer_size = parse_size(tmp);
|
||||||
if (buffer_size <= 0)
|
if (buffer_size <= 0)
|
||||||
{
|
{
|
||||||
@ -452,6 +478,8 @@ size_t vt_env_thread_bsize()
|
|||||||
tmp = getenv("VT_THREAD_BUFFER_SIZE");
|
tmp = getenv("VT_THREAD_BUFFER_SIZE");
|
||||||
if (tmp != NULL && strlen(tmp) > 0)
|
if (tmp != NULL && strlen(tmp) > 0)
|
||||||
{
|
{
|
||||||
|
vt_cntl_msg(2, "VT_THREAD_BUFFER_SIZE=%s", tmp);
|
||||||
|
|
||||||
buffer_size = parse_size(tmp);
|
buffer_size = parse_size(tmp);
|
||||||
if (buffer_size <= 0)
|
if (buffer_size <= 0)
|
||||||
{
|
{
|
||||||
@ -475,23 +503,25 @@ size_t vt_env_thread_bsize()
|
|||||||
|
|
||||||
size_t vt_env_copy_bsize()
|
size_t vt_env_copy_bsize()
|
||||||
{
|
{
|
||||||
static size_t buffer_size = 0;
|
static size_t buffer_size = 0;
|
||||||
char* tmp;
|
char* tmp;
|
||||||
|
|
||||||
if (buffer_size == 0)
|
if (buffer_size == 0)
|
||||||
{
|
{
|
||||||
tmp = getenv("VT_COPY_BUFFER_SIZE");
|
tmp = getenv("VT_COPY_BUFFER_SIZE");
|
||||||
if (tmp != NULL && strlen(tmp) > 0)
|
if (tmp != NULL && strlen(tmp) > 0)
|
||||||
{
|
{
|
||||||
buffer_size = parse_size(tmp);
|
vt_cntl_msg(2, "VT_COPY_BUFFER_SIZE=%s", tmp);
|
||||||
if (buffer_size <= 0)
|
|
||||||
vt_error_msg("VT_COPY_BUFFER_SIZE not properly set");
|
buffer_size = parse_size(tmp);
|
||||||
}
|
if (buffer_size <= 0)
|
||||||
else
|
vt_error_msg("VT_COPY_BUFFER_SIZE not properly set");
|
||||||
{
|
}
|
||||||
buffer_size = VT_DEFAULT_COPY_BUFFER_SIZE;
|
else
|
||||||
}
|
{
|
||||||
}
|
buffer_size = VT_DEFAULT_COPY_BUFFER_SIZE;
|
||||||
|
}
|
||||||
|
}
|
||||||
return buffer_size;
|
return buffer_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -505,6 +535,8 @@ int vt_env_pthread_reuse()
|
|||||||
tmp = getenv("VT_PTHREAD_REUSE");
|
tmp = getenv("VT_PTHREAD_REUSE");
|
||||||
if (tmp != NULL && strlen(tmp) > 0)
|
if (tmp != NULL && strlen(tmp) > 0)
|
||||||
{
|
{
|
||||||
|
vt_cntl_msg(2, "VT_PTHREAD_REUSE=%s", tmp);
|
||||||
|
|
||||||
pthread_reuse = parse_bool(tmp);
|
pthread_reuse = parse_bool(tmp);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -526,10 +558,13 @@ int vt_env_mode()
|
|||||||
if (tmp != NULL && strlen(tmp) > 0)
|
if (tmp != NULL && strlen(tmp) > 0)
|
||||||
{
|
{
|
||||||
char tmpbuf[128];
|
char tmpbuf[128];
|
||||||
char* p = tmpbuf;
|
char* p;
|
||||||
char* tk;
|
char* tk;
|
||||||
int dc;
|
int dc;
|
||||||
|
|
||||||
|
vt_cntl_msg(2, "VT_MODE=%s", tmp);
|
||||||
|
|
||||||
|
p = tmpbuf;
|
||||||
strncpy(tmpbuf, tmp, 127);
|
strncpy(tmpbuf, tmp, 127);
|
||||||
tmpbuf[127] = '\0';
|
tmpbuf[127] = '\0';
|
||||||
while( *p ) { *p = tolower(*p); p++; }
|
while( *p ) { *p = tolower(*p); p++; }
|
||||||
@ -567,6 +602,8 @@ int vt_env_stat_intv()
|
|||||||
tmp = getenv("VT_STAT_INTV");
|
tmp = getenv("VT_STAT_INTV");
|
||||||
if (tmp != NULL && strlen(tmp) > 0)
|
if (tmp != NULL && strlen(tmp) > 0)
|
||||||
{
|
{
|
||||||
|
vt_cntl_msg(2, "VT_STAT_INTV=%s", tmp);
|
||||||
|
|
||||||
stat_intv = atoi(tmp);
|
stat_intv = atoi(tmp);
|
||||||
if (stat_intv < 0)
|
if (stat_intv < 0)
|
||||||
vt_error_msg("VT_STAT_INTV not properly set");
|
vt_error_msg("VT_STAT_INTV not properly set");
|
||||||
@ -590,10 +627,13 @@ int vt_env_stat_props()
|
|||||||
if (tmp != NULL && strlen(tmp) > 0)
|
if (tmp != NULL && strlen(tmp) > 0)
|
||||||
{
|
{
|
||||||
char tmpbuf[128];
|
char tmpbuf[128];
|
||||||
char* p = tmpbuf;
|
char* p;
|
||||||
char* tk;
|
char* tk;
|
||||||
int dc;
|
int dc;
|
||||||
|
|
||||||
|
vt_cntl_msg(2, "VT_STAT_PROPS=%s", tmp);
|
||||||
|
|
||||||
|
p = tmpbuf;
|
||||||
strncpy(tmpbuf, tmp, 127);
|
strncpy(tmpbuf, tmp, 127);
|
||||||
tmpbuf[127] = '\0';
|
tmpbuf[127] = '\0';
|
||||||
while( *p ) { *p = tolower(*p); p++; }
|
while( *p ) { *p = tolower(*p); p++; }
|
||||||
@ -647,10 +687,13 @@ int vt_env_stat_msg_dtls()
|
|||||||
if (tmp != NULL && strlen(tmp) > 0)
|
if (tmp != NULL && strlen(tmp) > 0)
|
||||||
{
|
{
|
||||||
char tmpbuf[128];
|
char tmpbuf[128];
|
||||||
char* p = tmpbuf;
|
char* p;
|
||||||
char* tk;
|
char* tk;
|
||||||
int dc;
|
int dc;
|
||||||
|
|
||||||
|
vt_cntl_msg(2, "VT_STAT_MSG_DTLS=%s", tmp);
|
||||||
|
|
||||||
|
p = tmpbuf;
|
||||||
strncpy(tmpbuf, tmp, 127);
|
strncpy(tmpbuf, tmp, 127);
|
||||||
tmpbuf[127] = '\0';
|
tmpbuf[127] = '\0';
|
||||||
while( *p ) { *p = tolower(*p); p++; }
|
while( *p ) { *p = tolower(*p); p++; }
|
||||||
@ -692,10 +735,13 @@ int vt_env_stat_collop_dtls()
|
|||||||
if (tmp != NULL && strlen(tmp) > 0)
|
if (tmp != NULL && strlen(tmp) > 0)
|
||||||
{
|
{
|
||||||
char tmpbuf[128];
|
char tmpbuf[128];
|
||||||
char* p = tmpbuf;
|
char* p;
|
||||||
char* tk;
|
char* tk;
|
||||||
int dc;
|
int dc;
|
||||||
|
|
||||||
|
vt_cntl_msg(2, "VT_STAT_COLLOP_DTLS=%s", tmp);
|
||||||
|
|
||||||
|
p = tmpbuf;
|
||||||
strncpy(tmpbuf, tmp, 127);
|
strncpy(tmpbuf, tmp, 127);
|
||||||
tmpbuf[127] = '\0';
|
tmpbuf[127] = '\0';
|
||||||
while( *p ) { *p = tolower(*p); p++; }
|
while( *p ) { *p = tolower(*p); p++; }
|
||||||
@ -735,6 +781,8 @@ int vt_env_verbose()
|
|||||||
{
|
{
|
||||||
verbose = atoi(tmp);
|
verbose = atoi(tmp);
|
||||||
if (verbose < 0) verbose = 0;
|
if (verbose < 0) verbose = 0;
|
||||||
|
|
||||||
|
vt_cntl_msg(2, "VT_VERBOSE=%s", tmp);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -756,6 +804,8 @@ int vt_env_debug()
|
|||||||
{
|
{
|
||||||
debug = atoi(tmp);
|
debug = atoi(tmp);
|
||||||
if (debug < 0) debug = 0;
|
if (debug < 0) debug = 0;
|
||||||
|
|
||||||
|
vt_cntl_msg(2, "VT_DEBUG=%s", tmp);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -775,6 +825,8 @@ int vt_env_do_unify()
|
|||||||
tmp = getenv("VT_UNIFY");
|
tmp = getenv("VT_UNIFY");
|
||||||
if (tmp != NULL && strlen(tmp) > 0)
|
if (tmp != NULL && strlen(tmp) > 0)
|
||||||
{
|
{
|
||||||
|
vt_cntl_msg(2, "VT_UNIFY=%s", tmp);
|
||||||
|
|
||||||
do_unify = parse_bool(tmp);
|
do_unify = parse_bool(tmp);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -795,6 +847,8 @@ int vt_env_do_clean()
|
|||||||
tmp = getenv("VT_CLEAN");
|
tmp = getenv("VT_CLEAN");
|
||||||
if (tmp != NULL && strlen(tmp) > 0)
|
if (tmp != NULL && strlen(tmp) > 0)
|
||||||
{
|
{
|
||||||
|
vt_cntl_msg(2, "VT_CLEAN=%s", tmp);
|
||||||
|
|
||||||
do_clean = parse_bool(tmp);
|
do_clean = parse_bool(tmp);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -815,6 +869,8 @@ int vt_env_memtrace()
|
|||||||
tmp = getenv("VT_MEMTRACE");
|
tmp = getenv("VT_MEMTRACE");
|
||||||
if (tmp != NULL && strlen(tmp) > 0)
|
if (tmp != NULL && strlen(tmp) > 0)
|
||||||
{
|
{
|
||||||
|
vt_cntl_msg(2, "VT_MEMTRACE=%s", tmp);
|
||||||
|
|
||||||
memtrace = parse_bool(tmp);
|
memtrace = parse_bool(tmp);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -835,6 +891,8 @@ int vt_env_memtrace_marker()
|
|||||||
tmp = getenv("VT_MEMTRACE_MARKER");
|
tmp = getenv("VT_MEMTRACE_MARKER");
|
||||||
if (tmp != NULL && strlen(tmp) > 0)
|
if (tmp != NULL && strlen(tmp) > 0)
|
||||||
{
|
{
|
||||||
|
vt_cntl_msg(2, "VT_MEMTRACE_MARKER=%s", tmp);
|
||||||
|
|
||||||
memtrace_marker = parse_bool(tmp);
|
memtrace_marker = parse_bool(tmp);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -851,17 +909,19 @@ int vt_env_cpuidtrace()
|
|||||||
char* tmp;
|
char* tmp;
|
||||||
|
|
||||||
if (cpuidtrace == -1)
|
if (cpuidtrace == -1)
|
||||||
{
|
|
||||||
tmp = getenv("VT_CPUIDTRACE");
|
|
||||||
if (tmp != NULL && strlen(tmp) > 0)
|
|
||||||
{
|
{
|
||||||
cpuidtrace = parse_bool(tmp);
|
tmp = getenv("VT_CPUIDTRACE");
|
||||||
|
if (tmp != NULL && strlen(tmp) > 0)
|
||||||
|
{
|
||||||
|
vt_cntl_msg(2, "VT_CPUIDTRACE=%s", tmp);
|
||||||
|
|
||||||
|
cpuidtrace = parse_bool(tmp);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
cpuidtrace = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
cpuidtrace = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return cpuidtrace;
|
return cpuidtrace;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -875,6 +935,8 @@ int vt_env_iotrace()
|
|||||||
tmp = getenv("VT_IOTRACE");
|
tmp = getenv("VT_IOTRACE");
|
||||||
if (tmp != NULL && strlen(tmp) > 0)
|
if (tmp != NULL && strlen(tmp) > 0)
|
||||||
{
|
{
|
||||||
|
vt_cntl_msg(2, "VT_IOTRACE=%s", tmp);
|
||||||
|
|
||||||
iotrace = parse_bool(tmp);
|
iotrace = parse_bool(tmp);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -895,6 +957,8 @@ char* vt_env_iolibpathname()
|
|||||||
tmp = getenv("VT_IOLIB_PATHNAME");
|
tmp = getenv("VT_IOLIB_PATHNAME");
|
||||||
if (tmp != NULL && strlen(tmp) > 0)
|
if (tmp != NULL && strlen(tmp) > 0)
|
||||||
{
|
{
|
||||||
|
vt_cntl_msg(2, "VT_IOLIB_PATHNAME=%s", tmp);
|
||||||
|
|
||||||
pathname = replace_vars(tmp);
|
pathname = replace_vars(tmp);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -915,6 +979,8 @@ int vt_env_libctrace()
|
|||||||
tmp = getenv("VT_LIBCTRACE");
|
tmp = getenv("VT_LIBCTRACE");
|
||||||
if (tmp != NULL && strlen(tmp) > 0)
|
if (tmp != NULL && strlen(tmp) > 0)
|
||||||
{
|
{
|
||||||
|
vt_cntl_msg(2, "VT_LIBCTRACE=%s", tmp);
|
||||||
|
|
||||||
libctrace = parse_bool(tmp);
|
libctrace = parse_bool(tmp);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -935,6 +1001,8 @@ int vt_env_omptrace()
|
|||||||
tmp = getenv("VT_OMPTRACE");
|
tmp = getenv("VT_OMPTRACE");
|
||||||
if (tmp != NULL && strlen(tmp) > 0)
|
if (tmp != NULL && strlen(tmp) > 0)
|
||||||
{
|
{
|
||||||
|
vt_cntl_msg(2, "VT_OMPTRACE=%s", tmp);
|
||||||
|
|
||||||
omptrace = parse_bool(tmp);
|
omptrace = parse_bool(tmp);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -955,6 +1023,8 @@ int vt_env_mpitrace()
|
|||||||
tmp = getenv("VT_MPITRACE");
|
tmp = getenv("VT_MPITRACE");
|
||||||
if (tmp != NULL && strlen(tmp) > 0)
|
if (tmp != NULL && strlen(tmp) > 0)
|
||||||
{
|
{
|
||||||
|
vt_cntl_msg(2, "VT_MPITRACE=%s", tmp);
|
||||||
|
|
||||||
mpitrace = parse_bool(tmp);
|
mpitrace = parse_bool(tmp);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -975,6 +1045,8 @@ int vt_env_mpicheck()
|
|||||||
tmp = getenv("VT_MPICHECK");
|
tmp = getenv("VT_MPICHECK");
|
||||||
if (tmp != NULL && strlen(tmp) > 0)
|
if (tmp != NULL && strlen(tmp) > 0)
|
||||||
{
|
{
|
||||||
|
vt_cntl_msg(2, "VT_MPICHECK=%s", tmp);
|
||||||
|
|
||||||
mpicheck = parse_bool(tmp);
|
mpicheck = parse_bool(tmp);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -995,6 +1067,8 @@ int vt_env_max_mpi_comms()
|
|||||||
tmp = getenv("VT_MAX_MPI_COMMS");
|
tmp = getenv("VT_MAX_MPI_COMMS");
|
||||||
if (tmp != NULL && strlen(tmp) > 0)
|
if (tmp != NULL && strlen(tmp) > 0)
|
||||||
{
|
{
|
||||||
|
vt_cntl_msg(2, "VT_MAX_MPI_COMMS=%s", tmp);
|
||||||
|
|
||||||
max_mpi_comms = atoi(tmp);
|
max_mpi_comms = atoi(tmp);
|
||||||
if (max_mpi_comms < 2)
|
if (max_mpi_comms < 2)
|
||||||
vt_error_msg("VT_MAX_MPI_COMMS not properly set");
|
vt_error_msg("VT_MAX_MPI_COMMS not properly set");
|
||||||
@ -1017,6 +1091,8 @@ int vt_env_max_mpi_wins()
|
|||||||
tmp = getenv("VT_MAX_MPI_WINS");
|
tmp = getenv("VT_MAX_MPI_WINS");
|
||||||
if (tmp != NULL && strlen(tmp) > 0)
|
if (tmp != NULL && strlen(tmp) > 0)
|
||||||
{
|
{
|
||||||
|
vt_cntl_msg(2, "VT_MAX_MPI_WINS=%s", tmp);
|
||||||
|
|
||||||
max_mpi_wins = atoi(tmp);
|
max_mpi_wins = atoi(tmp);
|
||||||
if (max_mpi_wins < 1)
|
if (max_mpi_wins < 1)
|
||||||
vt_error_msg("VT_MAX_MPI_WINS not properly set");
|
vt_error_msg("VT_MAX_MPI_WINS not properly set");
|
||||||
@ -1039,6 +1115,8 @@ int vt_env_mpicheck_errexit()
|
|||||||
tmp = getenv("VT_MPICHECK_ERREXIT");
|
tmp = getenv("VT_MPICHECK_ERREXIT");
|
||||||
if (tmp != NULL && strlen(tmp) > 0)
|
if (tmp != NULL && strlen(tmp) > 0)
|
||||||
{
|
{
|
||||||
|
vt_cntl_msg(2, "VT_MPICHECK_ERREXIT=%s", tmp);
|
||||||
|
|
||||||
mpicheck_errexit = parse_bool(tmp);
|
mpicheck_errexit = parse_bool(tmp);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -1053,11 +1131,18 @@ char* vt_env_rusage()
|
|||||||
{
|
{
|
||||||
static int read = 1;
|
static int read = 1;
|
||||||
static char* rusage = NULL;
|
static char* rusage = NULL;
|
||||||
|
char* tmp;
|
||||||
|
|
||||||
if (read)
|
if (read)
|
||||||
{
|
{
|
||||||
read = 0;
|
read = 0;
|
||||||
rusage = getenv("VT_RUSAGE");
|
tmp = getenv("VT_RUSAGE");
|
||||||
|
if (tmp && strlen(tmp) > 0)
|
||||||
|
{
|
||||||
|
vt_cntl_msg(2, "VT_RUSAGE=%s", tmp);
|
||||||
|
|
||||||
|
rusage = tmp;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return rusage;
|
return rusage;
|
||||||
}
|
}
|
||||||
@ -1072,6 +1157,8 @@ int vt_env_rusage_intv()
|
|||||||
tmp = getenv("VT_RUSAGE_INTV");
|
tmp = getenv("VT_RUSAGE_INTV");
|
||||||
if (tmp != NULL && strlen(tmp) > 0)
|
if (tmp != NULL && strlen(tmp) > 0)
|
||||||
{
|
{
|
||||||
|
vt_cntl_msg(2, "VT_RUSAGE_INTV=%s", tmp);
|
||||||
|
|
||||||
rusage_intv = atoi(tmp);
|
rusage_intv = atoi(tmp);
|
||||||
if (rusage_intv < 0)
|
if (rusage_intv < 0)
|
||||||
vt_error_msg("VT_RUSAGE_INTV not properly set");
|
vt_error_msg("VT_RUSAGE_INTV not properly set");
|
||||||
@ -1088,13 +1175,18 @@ char* vt_env_metrics()
|
|||||||
{
|
{
|
||||||
static int read = 1;
|
static int read = 1;
|
||||||
static char* metrics = NULL;
|
static char* metrics = NULL;
|
||||||
|
char* tmp;
|
||||||
|
|
||||||
if (read)
|
if (read)
|
||||||
{
|
{
|
||||||
read = 0;
|
read = 0;
|
||||||
metrics = getenv("VT_METRICS");
|
tmp = getenv("VT_METRICS");
|
||||||
if ( metrics != NULL && strlen(metrics) == 0 )
|
if (tmp && strlen(tmp) > 0)
|
||||||
metrics = NULL;
|
{
|
||||||
|
vt_cntl_msg(2, "VT_METRICS=%s", tmp);
|
||||||
|
|
||||||
|
metrics = tmp;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return metrics;
|
return metrics;
|
||||||
}
|
}
|
||||||
@ -1102,16 +1194,22 @@ char* vt_env_metrics()
|
|||||||
char* vt_env_metrics_sep()
|
char* vt_env_metrics_sep()
|
||||||
{
|
{
|
||||||
static char* metrics_sep = NULL;
|
static char* metrics_sep = NULL;
|
||||||
|
char* tmp;
|
||||||
|
|
||||||
if (!metrics_sep)
|
if (!metrics_sep)
|
||||||
{
|
{
|
||||||
metrics_sep = getenv("VT_METRICS_SEP");
|
tmp = getenv("VT_METRICS_SEP");
|
||||||
if (metrics_sep == NULL || strlen(metrics_sep) == 0)
|
if (tmp && strlen(tmp) > 0)
|
||||||
|
{
|
||||||
|
vt_cntl_msg(2, "VT_METRICS_SEP=%s", tmp);
|
||||||
|
|
||||||
|
metrics_sep = tmp;
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
metrics_sep = ":";
|
metrics_sep = ":";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return metrics_sep;
|
return metrics_sep;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1157,6 +1255,8 @@ int vt_env_sync_flush()
|
|||||||
tmp = getenv("VT_SYNC_FLUSH");
|
tmp = getenv("VT_SYNC_FLUSH");
|
||||||
if (tmp != NULL && strlen(tmp) > 0)
|
if (tmp != NULL && strlen(tmp) > 0)
|
||||||
{
|
{
|
||||||
|
vt_cntl_msg(2, "VT_SYNC_FLUSH=%s", tmp);
|
||||||
|
|
||||||
sync_flush = parse_bool(tmp);
|
sync_flush = parse_bool(tmp);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -1177,6 +1277,8 @@ int vt_env_sync_flush_level()
|
|||||||
tmp = getenv("VT_SYNC_FLUSH_LEVEL");
|
tmp = getenv("VT_SYNC_FLUSH_LEVEL");
|
||||||
if (tmp != NULL && strlen(tmp) > 0)
|
if (tmp != NULL && strlen(tmp) > 0)
|
||||||
{
|
{
|
||||||
|
vt_cntl_msg(2, "VT_SYNC_FLUSH_LEVEL=%s", tmp);
|
||||||
|
|
||||||
sync_flush_level = atoi(tmp);
|
sync_flush_level = atoi(tmp);
|
||||||
if (sync_flush_level < 0 || sync_flush_level > 100)
|
if (sync_flush_level < 0 || sync_flush_level > 100)
|
||||||
vt_error_msg("VT_SYNC_FLUSH_LEVEL not properly set");
|
vt_error_msg("VT_SYNC_FLUSH_LEVEL not properly set");
|
||||||
@ -1199,6 +1301,8 @@ int vt_env_max_stack_depth()
|
|||||||
tmp = getenv("VT_MAX_STACK_DEPTH");
|
tmp = getenv("VT_MAX_STACK_DEPTH");
|
||||||
if (tmp != NULL && strlen(tmp) > 0)
|
if (tmp != NULL && strlen(tmp) > 0)
|
||||||
{
|
{
|
||||||
|
vt_cntl_msg(2, "VT_MAX_STACK_DEPTH=%s", tmp);
|
||||||
|
|
||||||
max_stack_depth = atoi(tmp);
|
max_stack_depth = atoi(tmp);
|
||||||
if (max_stack_depth < 0)
|
if (max_stack_depth < 0)
|
||||||
vt_error_msg("VT_MAX_STACK_DEPTH not properly set");
|
vt_error_msg("VT_MAX_STACK_DEPTH not properly set");
|
||||||
@ -1221,6 +1325,8 @@ int vt_env_max_flushes()
|
|||||||
tmp = getenv("VT_MAX_FLUSHES");
|
tmp = getenv("VT_MAX_FLUSHES");
|
||||||
if (tmp != NULL && strlen(tmp) > 0)
|
if (tmp != NULL && strlen(tmp) > 0)
|
||||||
{
|
{
|
||||||
|
vt_cntl_msg(2, "VT_MAX_FLUSHES=%s", tmp);
|
||||||
|
|
||||||
max_flushes = atoi(tmp);
|
max_flushes = atoi(tmp);
|
||||||
if (max_flushes < 0)
|
if (max_flushes < 0)
|
||||||
vt_error_msg("VT_MAX_FLUSHES not properly set");
|
vt_error_msg("VT_MAX_FLUSHES not properly set");
|
||||||
@ -1243,6 +1349,8 @@ int vt_env_max_threads()
|
|||||||
tmp = getenv("VT_MAX_THREADS");
|
tmp = getenv("VT_MAX_THREADS");
|
||||||
if (tmp != NULL && strlen(tmp) > 0)
|
if (tmp != NULL && strlen(tmp) > 0)
|
||||||
{
|
{
|
||||||
|
vt_cntl_msg(2, "VT_MAX_THREADS=%s", tmp);
|
||||||
|
|
||||||
max_threads = atoi(tmp);
|
max_threads = atoi(tmp);
|
||||||
if (max_threads < 1 || max_threads > VT_MAX_THREADS)
|
if (max_threads < 1 || max_threads > VT_MAX_THREADS)
|
||||||
vt_error_msg("VT_MAX_THREADS not properly set");
|
vt_error_msg("VT_MAX_THREADS not properly set");
|
||||||
@ -1266,6 +1374,8 @@ int vt_env_compression()
|
|||||||
tmp = getenv("VT_COMPRESSION");
|
tmp = getenv("VT_COMPRESSION");
|
||||||
if (tmp != NULL && strlen(tmp) > 0)
|
if (tmp != NULL && strlen(tmp) > 0)
|
||||||
{
|
{
|
||||||
|
vt_cntl_msg(2, "VT_COMPRESSION=%s", tmp);
|
||||||
|
|
||||||
compression = parse_bool(tmp);
|
compression = parse_bool(tmp);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -1289,6 +1399,8 @@ int vt_env_java_native()
|
|||||||
tmp = getenv("VT_JAVA_NATIVE");
|
tmp = getenv("VT_JAVA_NATIVE");
|
||||||
if (tmp != NULL && strlen(tmp) > 0)
|
if (tmp != NULL && strlen(tmp) > 0)
|
||||||
{
|
{
|
||||||
|
vt_cntl_msg(2, "VT_JAVA_NATIVE=%s", tmp);
|
||||||
|
|
||||||
native = parse_bool(tmp);
|
native = parse_bool(tmp);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -1309,6 +1421,8 @@ int vt_env_java_synthetic()
|
|||||||
tmp = getenv("VT_JAVA_SYNTHETIC");
|
tmp = getenv("VT_JAVA_SYNTHETIC");
|
||||||
if (tmp != NULL && strlen(tmp) > 0)
|
if (tmp != NULL && strlen(tmp) > 0)
|
||||||
{
|
{
|
||||||
|
vt_cntl_msg(2, "VT_JAVA_SYNTHETIC=%s", tmp);
|
||||||
|
|
||||||
synthetic = parse_bool(tmp);
|
synthetic = parse_bool(tmp);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -1329,6 +1443,8 @@ int vt_env_java_group_classes()
|
|||||||
tmp = getenv("VT_JAVA_GROUP_CLASSES");
|
tmp = getenv("VT_JAVA_GROUP_CLASSES");
|
||||||
if (tmp != NULL && strlen(tmp) > 0)
|
if (tmp != NULL && strlen(tmp) > 0)
|
||||||
{
|
{
|
||||||
|
vt_cntl_msg(2, "VT_JAVA_GROUP_CLASSES=%s", tmp);
|
||||||
|
|
||||||
group_classes = parse_bool(tmp);
|
group_classes = parse_bool(tmp);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -1350,9 +1466,11 @@ char* vt_env_java_filter_spec()
|
|||||||
read = 0;
|
read = 0;
|
||||||
tmp = getenv("VT_JAVA_FILTER_SPEC");
|
tmp = getenv("VT_JAVA_FILTER_SPEC");
|
||||||
if (tmp != NULL && strlen(tmp) > 0)
|
if (tmp != NULL && strlen(tmp) > 0)
|
||||||
{
|
{
|
||||||
spec = replace_vars(tmp);
|
vt_cntl_msg(2, "VT_JAVA_FILTER_SPEC=%s", tmp);
|
||||||
}
|
|
||||||
|
spec = replace_vars(tmp);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return spec;
|
return spec;
|
||||||
}
|
}
|
||||||
@ -1369,6 +1487,8 @@ char* vt_env_filter_spec()
|
|||||||
tmp = getenv("VT_FILTER_SPEC");
|
tmp = getenv("VT_FILTER_SPEC");
|
||||||
if (tmp != NULL && strlen(tmp) > 0)
|
if (tmp != NULL && strlen(tmp) > 0)
|
||||||
{
|
{
|
||||||
|
vt_cntl_msg(2, "VT_FILTER_SPEC=%s", tmp);
|
||||||
|
|
||||||
spec = replace_vars(tmp);
|
spec = replace_vars(tmp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1387,6 +1507,8 @@ char* vt_env_groups_spec()
|
|||||||
tmp = getenv("VT_GROUPS_SPEC");
|
tmp = getenv("VT_GROUPS_SPEC");
|
||||||
if (tmp != NULL && strlen(tmp) > 0)
|
if (tmp != NULL && strlen(tmp) > 0)
|
||||||
{
|
{
|
||||||
|
vt_cntl_msg(2, "VT_GROUPS_SPEC=%s", tmp);
|
||||||
|
|
||||||
spec = replace_vars(tmp);
|
spec = replace_vars(tmp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1403,6 +1525,8 @@ int vt_env_etimesync()
|
|||||||
tmp = getenv("VT_ETIMESYNC");
|
tmp = getenv("VT_ETIMESYNC");
|
||||||
if (tmp != NULL && strlen(tmp) > 0)
|
if (tmp != NULL && strlen(tmp) > 0)
|
||||||
{
|
{
|
||||||
|
vt_cntl_msg(2, "VT_ETIMESYNC=%s", tmp);
|
||||||
|
|
||||||
etimesync = parse_bool(tmp);
|
etimesync = parse_bool(tmp);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -1423,6 +1547,8 @@ int vt_env_etimesync_intv()
|
|||||||
tmp = getenv("VT_ETIMESYNC_INTV");
|
tmp = getenv("VT_ETIMESYNC_INTV");
|
||||||
if (tmp != NULL && strlen(tmp) > 0)
|
if (tmp != NULL && strlen(tmp) > 0)
|
||||||
{
|
{
|
||||||
|
vt_cntl_msg(2, "VT_ETIMESYNC_INTV=%s", tmp);
|
||||||
|
|
||||||
etimesync_intv = atoi(tmp);
|
etimesync_intv = atoi(tmp);
|
||||||
if (etimesync_intv < 0)
|
if (etimesync_intv < 0)
|
||||||
vt_error_msg("VT_ETIMESYNC_INTV not properly set");
|
vt_error_msg("VT_ETIMESYNC_INTV not properly set");
|
||||||
@ -1439,43 +1565,58 @@ int vt_env_cudarttrace()
|
|||||||
{
|
{
|
||||||
static int cudarttrace = -1;
|
static int cudarttrace = -1;
|
||||||
|
|
||||||
if (cudarttrace == -1){
|
if (cudarttrace == -1)
|
||||||
char* tmp = getenv("VT_CUDARTTRACE");
|
{
|
||||||
|
char* tmp = getenv("VT_CUDARTTRACE");
|
||||||
|
if (tmp != NULL && strlen(tmp) > 0)
|
||||||
|
{
|
||||||
|
vt_cntl_msg(2, "VT_CUDARTTRACE=%s", tmp);
|
||||||
|
|
||||||
if(tmp != NULL && strlen(tmp) > 0){
|
cudarttrace = parse_bool(tmp);
|
||||||
cudarttrace = parse_bool(tmp);
|
}
|
||||||
}else{
|
else
|
||||||
cudarttrace = 0;
|
{
|
||||||
|
cudarttrace = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return cudarttrace;
|
return cudarttrace;
|
||||||
}
|
}
|
||||||
|
|
||||||
int vt_env_cudatrace_idle(){
|
int vt_env_cudatrace_idle()
|
||||||
|
{
|
||||||
static int cudaidle = -1;
|
static int cudaidle = -1;
|
||||||
|
|
||||||
if (cudaidle == -1){
|
if (cudaidle == -1)
|
||||||
char* tmp = getenv("VT_CUDATRACE_IDLE");
|
{
|
||||||
|
char* tmp = getenv("VT_CUDATRACE_IDLE");
|
||||||
|
if (tmp != NULL && strlen(tmp) > 0)
|
||||||
|
{
|
||||||
|
vt_cntl_msg(2, "VT_CUDATRACE_IDLE=%s", tmp);
|
||||||
|
|
||||||
if(tmp != NULL && strlen(tmp) > 0){
|
cudaidle = parse_bool(tmp);
|
||||||
cudaidle = parse_bool(tmp);
|
}
|
||||||
}else{
|
else
|
||||||
cudaidle = 0;
|
{
|
||||||
|
cudaidle = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return cudaidle;
|
return cudaidle;
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t vt_env_cudatrace_bsize(){
|
size_t vt_env_cudatrace_bsize()
|
||||||
|
{
|
||||||
static size_t limit = 0;
|
static size_t limit = 0;
|
||||||
|
|
||||||
if (limit == 0) {
|
if (limit == 0)
|
||||||
char* tmp = getenv("VT_CUDATRACE_BUFFER_SIZE");
|
{
|
||||||
|
char* tmp = getenv("VT_CUDATRACE_BUFFER_SIZE");
|
||||||
|
if (tmp != NULL && strlen(tmp) > 0)
|
||||||
|
{
|
||||||
|
vt_cntl_msg(2, "VT_CUDATRACE_BUFFER_SIZE=%s", tmp);
|
||||||
|
|
||||||
if(tmp != NULL && strlen(tmp) > 0){
|
limit = parse_size(tmp);
|
||||||
limit = parse_size(tmp);
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return limit;
|
return limit;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1483,15 +1624,20 @@ int vt_env_cudatrace_kernel()
|
|||||||
{
|
{
|
||||||
static int cudakernels = -1;
|
static int cudakernels = -1;
|
||||||
|
|
||||||
if(cudakernels == -1){
|
if (cudakernels == -1)
|
||||||
char* tmp = getenv("VT_CUDATRACE_KERNEL");
|
{
|
||||||
|
char* tmp = getenv("VT_CUDATRACE_KERNEL");
|
||||||
|
if (tmp != NULL && strlen(tmp) > 0)
|
||||||
|
{
|
||||||
|
vt_cntl_msg(2, "VT_CUDATRACE_KERNEL=%s", tmp);
|
||||||
|
|
||||||
if(tmp != NULL && strlen(tmp) > 0){
|
cudakernels = parse_bool(tmp);
|
||||||
cudakernels = parse_bool(tmp);
|
}
|
||||||
}else{
|
else
|
||||||
cudakernels = 1;
|
{
|
||||||
|
cudakernels = 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return cudakernels;
|
return cudakernels;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1499,15 +1645,20 @@ int vt_env_cudatrace_memcpyasync()
|
|||||||
{
|
{
|
||||||
static int cudamcpy = -1;
|
static int cudamcpy = -1;
|
||||||
|
|
||||||
if(cudamcpy == -1){
|
if (cudamcpy == -1)
|
||||||
char* tmp = getenv("VT_CUDATRACE_MEMCPYASYNC");
|
{
|
||||||
|
char* tmp = getenv("VT_CUDATRACE_MEMCPYASYNC");
|
||||||
|
if (tmp != NULL && strlen(tmp) > 0)
|
||||||
|
{
|
||||||
|
vt_cntl_msg(2, "VT_CUDATRACE_MEMCPYASYNC=%s", tmp);
|
||||||
|
|
||||||
if(tmp != NULL && strlen(tmp) > 0){
|
cudamcpy = parse_bool(tmp);
|
||||||
cudamcpy = parse_bool(tmp);
|
}
|
||||||
}else{
|
else
|
||||||
cudamcpy = 1;
|
{
|
||||||
|
cudamcpy = 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return cudamcpy;
|
return cudamcpy;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1515,17 +1666,22 @@ int vt_env_cudatrace_sync()
|
|||||||
{
|
{
|
||||||
static int sync = -1;
|
static int sync = -1;
|
||||||
|
|
||||||
if(sync == -1){
|
if (sync == -1)
|
||||||
char* tmp = getenv("VT_CUDATRACE_SYNC");
|
{
|
||||||
|
char* tmp = getenv("VT_CUDATRACE_SYNC");
|
||||||
|
if (tmp != NULL && strlen(tmp) > 0)
|
||||||
|
{
|
||||||
|
vt_cntl_msg(2, "VT_CUDATRACE_SYNC=%s", tmp);
|
||||||
|
|
||||||
if(tmp != NULL && strlen(tmp) > 0){
|
sync = atoi(tmp);
|
||||||
sync = atoi(tmp);
|
/* perhaps user wrote 'yes' or 'true' */
|
||||||
/* perhaps user wrote 'yes' or 'true' */
|
if(sync == 0 && parse_bool(tmp) == 1) sync = 3;
|
||||||
if(sync == 0 && parse_bool(tmp) == 1) sync = 3;
|
}
|
||||||
}else{
|
else
|
||||||
sync = 3;
|
{
|
||||||
|
sync = 3;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return sync;
|
return sync;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1533,15 +1689,20 @@ int vt_env_cudatrace_gpumem()
|
|||||||
{
|
{
|
||||||
static int cudamem = -1;
|
static int cudamem = -1;
|
||||||
|
|
||||||
if(cudamem == -1){
|
if (cudamem == -1)
|
||||||
char* tmp = getenv("VT_CUDATRACE_GPUMEMUSAGE");
|
{
|
||||||
|
char* tmp = getenv("VT_CUDATRACE_GPUMEMUSAGE");
|
||||||
|
if (tmp != NULL && strlen(tmp) > 0)
|
||||||
|
{
|
||||||
|
vt_cntl_msg(2, "VT_CUDATRACE_GPUMEMUSAGE=%s", tmp);
|
||||||
|
|
||||||
if(tmp != NULL && strlen(tmp) > 0){
|
cudamem = parse_bool(tmp);
|
||||||
cudamem = parse_bool(tmp);
|
}
|
||||||
}else{
|
else
|
||||||
cudamem = 0;
|
{
|
||||||
|
cudamem = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return cudamem;
|
return cudamem;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1549,15 +1710,20 @@ int vt_env_cudatrace_error()
|
|||||||
{
|
{
|
||||||
static int error = -1;
|
static int error = -1;
|
||||||
|
|
||||||
if(error == -1){
|
if (error == -1)
|
||||||
char* tmp = getenv("VT_CUDATRACE_ERROR");
|
{
|
||||||
|
char* tmp = getenv("VT_CUDATRACE_ERROR");
|
||||||
|
if(tmp != NULL && strlen(tmp) > 0)
|
||||||
|
{
|
||||||
|
vt_cntl_msg(2, "VT_CUDATRACE_ERROR=%s", tmp);
|
||||||
|
|
||||||
if(tmp != NULL && strlen(tmp) > 0){
|
error = parse_bool(tmp);
|
||||||
error = parse_bool(tmp);
|
}
|
||||||
}else{
|
else
|
||||||
error = 0;
|
{
|
||||||
|
error = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1565,14 +1731,19 @@ char* vt_env_cupti_metrics()
|
|||||||
{
|
{
|
||||||
static int read = 1;
|
static int read = 1;
|
||||||
static char* metrics = NULL;
|
static char* metrics = NULL;
|
||||||
|
char* tmp;
|
||||||
|
|
||||||
if(read){
|
if (read)
|
||||||
read = 0;
|
{
|
||||||
metrics = getenv("VT_CUPTI_METRICS");
|
read = 0;
|
||||||
if(metrics != NULL && strlen(metrics) == 0){
|
tmp = getenv("VT_CUPTI_METRICS");
|
||||||
metrics = NULL;
|
if (tmp && strlen(tmp) > 0)
|
||||||
|
{
|
||||||
|
vt_cntl_msg(2, "VT_CUPTI_METRICS=%s", tmp);
|
||||||
|
|
||||||
|
metrics = tmp;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return metrics;
|
return metrics;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1580,32 +1751,42 @@ int vt_env_cupti_sampling()
|
|||||||
{
|
{
|
||||||
static int cuptisampling = -1;
|
static int cuptisampling = -1;
|
||||||
|
|
||||||
if (cuptisampling == -1){
|
if (cuptisampling == -1)
|
||||||
char* tmp = getenv("VT_CUPTI_SAMPLING");
|
{
|
||||||
|
char* tmp = getenv("VT_CUPTI_SAMPLING");
|
||||||
|
if (tmp != NULL && strlen(tmp) > 0)
|
||||||
|
{
|
||||||
|
vt_cntl_msg(2, "VT_CUPTI_SAMPLING=%s", tmp);
|
||||||
|
|
||||||
if(tmp != NULL && strlen(tmp) > 0){
|
cuptisampling = parse_bool(tmp);
|
||||||
cuptisampling = parse_bool(tmp);
|
}
|
||||||
}else{
|
else
|
||||||
cuptisampling = 0;
|
{
|
||||||
|
cuptisampling = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return cuptisampling;
|
return cuptisampling;
|
||||||
}
|
}
|
||||||
|
|
||||||
int vt_env_gputrace_debug()
|
int vt_env_gputrace_debug()
|
||||||
{
|
{
|
||||||
static int debug = -1;
|
static int debug = -1;
|
||||||
|
|
||||||
if(debug == -1){
|
if (debug == -1)
|
||||||
char* tmp = getenv("VT_GPUTRACE_DEBUG");
|
{
|
||||||
|
char* tmp = getenv("VT_GPUTRACE_DEBUG");
|
||||||
|
if (tmp != NULL && strlen(tmp) > 0)
|
||||||
|
{
|
||||||
|
vt_cntl_msg(2, "VT_GPUTRACE_DEBUG=%s", tmp);
|
||||||
|
|
||||||
if(tmp != NULL && strlen(tmp) > 0){
|
debug = atoi(tmp);
|
||||||
debug = atoi(tmp);
|
/* perhaps user wrote 'yes' or 'true' */
|
||||||
/* perhaps user wrote 'yes' or 'true' */
|
if(debug == 0 && parse_bool(tmp) == 1) debug = 1;
|
||||||
if(debug == 0 && parse_bool(tmp) == 1) debug = 1;
|
}
|
||||||
}else{
|
else
|
||||||
debug = 0;
|
{
|
||||||
|
debug = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return debug;
|
return debug;
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
# define EXTERN extern
|
# define EXTERN extern
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "jvmti.h"
|
#include "vt_jvmti.h"
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
|
23
ompi/contrib/vt/vt/vtlib/vt_jvmti.h
Обычный файл
23
ompi/contrib/vt/vt/vtlib/vt_jvmti.h
Обычный файл
@ -0,0 +1,23 @@
|
|||||||
|
/**
|
||||||
|
* VampirTrace
|
||||||
|
* http://www.tu-dresden.de/zih/vampirtrace
|
||||||
|
*
|
||||||
|
* Copyright (c) 2005-2011, ZIH, TU Dresden, Federal Republic of Germany
|
||||||
|
*
|
||||||
|
* Copyright (c) 1998-2005, Forschungszentrum Juelich, Juelich Supercomputing
|
||||||
|
* Centre, Federal Republic of Germany
|
||||||
|
*
|
||||||
|
* See the file COPYING in the package base directory for details
|
||||||
|
**/
|
||||||
|
|
||||||
|
#ifndef _VT_JVMTI_H
|
||||||
|
#define _VT_JVMTI_H
|
||||||
|
|
||||||
|
/* Disable all compiler warnings before including the actual
|
||||||
|
JVMTI header file. */
|
||||||
|
#ifdef __GNUC__
|
||||||
|
# pragma GCC system_header
|
||||||
|
#endif /* __GNUC__ */
|
||||||
|
#include "jvmti.h"
|
||||||
|
|
||||||
|
#endif /* _VT_JVMTI_H */
|
Загрузка…
x
Ссылка в новой задаче
Block a user