Changeset a7b97b9
- Timestamp:
- 05/30/15 23:54:09 (9 years ago)
- Branches:
- master
- Children:
- 22f928f
- Parents:
- 518793d
- git-author:
- Hal Finkel <hfinkel@…> (05/30/15 23:54:09)
- git-committer:
- Hal Finkel <hfinkel@…> (05/30/15 23:54:09)
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
Makefile
r510af01 ra7b97b9 2 2 CXXFLAGS = -std=gnu++0x -O3 -g 3 3 4 CPPFLAGS = 4 # When compiling with CXX=powerpc64-bgq-linux-g++, we need these: 5 CPPFLAGS = -I/bgsys/drivers/ppcfloor -I/bgsys/drivers/ppcfloor/spi/include/kernel/cnk 6 5 7 LDFLAGS = -lpthread -ldl 6 8 -
memlog.cpp
rf715c76 ra7b97b9 27 27 #include <dlfcn.h> 28 28 29 #ifdef __bgq__ 30 #include <spi/include/kernel/location.h> 31 #endif 32 29 33 using namespace std; 30 34 … … 46 50 uname(&u); 47 51 52 int id = (int) getpid(); 53 #ifdef __bgq__ 54 // If we're really running on a BG/Q compute node, use the job rank instead 55 // of the pid because the node name might not really be globally unique. 56 if (!strcmp(u.sysname, "CNK") && !strcmp(u.machine, "BGQ")) 57 id = (int) Kernel_GetRank(); 58 #endif 59 48 60 char log_name[PATH_MAX+1]; 49 snprintf(log_name, PATH_MAX+1, "%s.%d.memlog", u.nodename, getpid());61 snprintf(log_name, PATH_MAX+1, "%s.%d.memlog", u.nodename, id); 50 62 log_file = fopen(log_name, "w"); 51 63 if (!log_file)
Note: See TracChangeset
for help on using the changeset viewer.