-L/opt/perf/tau-2.16.4/x86_64/lib -R /opt/perf/tau-2.16.4/x86_64/lib -lTAU
to specify the search path for TAU shared libraries. When using the Intel Fortran compiler. Try "-Xlinker -rpath -Xlinker path-to-lib" flag instead.
static Performance::Measurement measurement = babel_cast<Performance::Measurement>(services_.getPort("MeasurementPort"));
if (measurement._is_nil()) {
std::cout << "didn't get measurement\n";
abort();
}
static Performance::Timer tm =
measurement.createTimerWithNameTypeGroup("driver_twoei_loop","TIMER","Chemistry_driver");
tm.start();
// some computation here
tm.stop();
services_.releasePort("MeasurementPort");
We use MPI program to start ccafe-batch in parallel. However, the profiles got are only profile.0.0.0 even when running on multiple nodes. One possible reason for this problem is that TAU may not be correctly configured with MPI program. To test if TAU is configured with MPI program, goto $tau-dir/examples/taucompiler/c and type "make". For the gamess-component package, we choose not to use Performance::Measurement components currently, because we just need timers for measuring the performance of both components and the wrapper functons, which can be provided by TAU in a very simple way.
(14466) /scratch/fangp/cca-tools-0.6.2_rc3/ccaffeine-0.8.2/cxx/dc/user_iface/CmdLineClientMain.cxx: MPI_Finalize being called.
(14463) /scratch/fangp/cca-tools-0.6.2_rc3/ccaffeine-0.8.2/cxx/dc/user_iface/CmdLineClientMain.cxx: MPI_Finalize being called.
rank 2 in job 27 t1.tools.scl.ameslab.gov_45684 caused collective abort of all ranks
exit status of rank 2: killed by signal 9
make[1]: *** [test] Error 137
make[1]: Leaving directory `/clusters/scl/fangp/babel-1.0-branch/gamess-component-0.1.3-2/components/examples'
make: *** [test] Error 2
int index=1;
int katom;
gamess_katom( &index, &katom);
The function header for games_katom is:
void gamess_katom_(int* index, int* iatom);
The Fortran 77 implementation is:
*-----------------------------------------------------------------
* Deck nshel ** subroutine gamess_katom
* Get the atom index for a shell
*------------------------------------------------------------------
subroutine gamess_katom(index,iatom)
#include "shell.fh"
if ((index .lt. 0) .and. (index .gt. mxsh)) then
write(iw,*) "index = ", index, " is invalid."
return
end if
write(iw,*) "index = ", index
iatom = KATOM(index+1)
return
end
When the variable index was passed as a parameter from CCA interfaces to GAMESS wrapper functions, it printed out a very large number instead of the original value 1 (due to the INDEX error). Solve: The above problem occurs because the gcc and g++ compilers do not set the length of an integer to 64 bits, while Fortran 77 do that implicitly when the corresponding options are specified during the compilation. We need to set the integer type in c/c++ to 64 bits explicitly. Thus, for each variable with integer type that passed to the Fortran 77 wrapper functions, we need to explicitly declare it as ”int64_t” data type. For example,in ”GAMESS_GaussianBasis_Atomic_Impl.cxx”, we had
int64_t index=1;
int64_t katom;
gamess_katom( &index, &katom);
The function header for games_katom is:
void gamess_katom_(int64_t* index, int64_t* iatom);
However, to make GAMESS CCA component works on borges, the portability has been sacrificed. We need to find a way to solve the integer type mis-match between c/c++ and Fortran 77 without explicitly declare the integer type to ”int64_t” in the component implementations. The strategy we used to solve this issue is to add a flag "-DLINUX64" to compile component implementation files when the architecture is "LINUX64". We also added a macro into the header files under the directory ”legacy/gamess/include”.
#ifdef LINUX64
typedef int64_t INT_TYPE;
#else
typedef int INT_TYPE;
#endif
Instead of define an integer as ”int” or ”int64_t” in the component implementation files, we use ”INT_TYPE” so that the interoperability of the integer type between C/C++ and FORTRAN 77 has been taken cared in the header files.