mirror of
https://github.com/paboyle/Grid.git
synced 2025-06-17 15:27:06 +01:00
Merge branch 'develop' of https://github.com/paboyle/Grid into merge2
This commit is contained in:
@ -297,12 +297,7 @@ void Grid_init(int *argc,char ***argv)
|
||||
std::cout << "but WITHOUT ANY WARRANTY; without even the implied warranty of"<<std::endl;
|
||||
std::cout << "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the"<<std::endl;
|
||||
std::cout << "GNU General Public License for more details."<<std::endl;
|
||||
#ifdef GITHASH
|
||||
std::cout << "Current Grid git commit hash=" << GITHASH << std::endl;
|
||||
#else
|
||||
std::cout << "Current Grid git commit hash is undefined. Check makefile." << std::endl;
|
||||
#endif
|
||||
#undef GITHASH
|
||||
printHash();
|
||||
std::cout << std::endl;
|
||||
}
|
||||
|
||||
@ -398,6 +393,7 @@ void Grid_init(int *argc,char ***argv)
|
||||
if( GridCmdOptionExists(*argv,*argv+*argc,"--comms-threads") ){
|
||||
arg= GridCmdOptionPayload(*argv,*argv+*argc,"--comms-threads");
|
||||
GridCmdOptionInt(arg,CartesianCommunicator::nCommThreads);
|
||||
assert(CartesianCommunicator::nCommThreads > 0);
|
||||
}
|
||||
if( GridCmdOptionExists(*argv,*argv+*argc,"--cacheblocking") ){
|
||||
arg= GridCmdOptionPayload(*argv,*argv+*argc,"--cacheblocking");
|
||||
|
@ -64,6 +64,7 @@ namespace Grid {
|
||||
std::vector<int> &simd,
|
||||
std::vector<int> &mpi);
|
||||
|
||||
void printHash(void);
|
||||
|
||||
};
|
||||
#endif
|
||||
|
12
lib/util/version.cc
Normal file
12
lib/util/version.cc
Normal file
@ -0,0 +1,12 @@
|
||||
#include <iostream>
|
||||
#include <version.h>
|
||||
namespace Grid {
|
||||
void printHash(){
|
||||
#ifdef GITHASH
|
||||
std::cout << "Current Grid git commit hash=" << GITHASH << std::endl;
|
||||
#else
|
||||
std::cout << "Current Grid git commit hash is undefined. Check makefile." << std::endl;
|
||||
#endif
|
||||
#undef GITHASH
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user