<div dir="ltr">Hi,<div><br></div><div>No, you need a script that can implement</div><div><br></div><div>yourscript.sh -c source.c -o source.o</div><div><br></div><div>by producing</div><div><br></div><div>scalasca -instrument /path/to/icc -c source.c -o source.o</div><div><br></div><div>But please check the SCALASCA documentation - if they don't support CMake or document how to use it, then they need to hear that you want it to work.</div><div><br></div><div>Mark</div></div><br><div class="gmail_quote"><div dir="ltr">On Mon, Jun 27, 2016 at 10:54 PM jing liang <<a href="mailto:jingliang2015@gmail.com">jingliang2015@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<div><br></div><div>I have the script call cc.sh which has the lines:</div><div>#!/bin/sh<br></div><div>/scalasca -instrument "$@" <br></div><div><br></div><div>where I should call that script?</div><div><br></div><div>thanks.</div><div><br></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-06-27 22:03 GMT+02:00 Mark Abraham <span dir="ltr"><<a href="mailto:mark.j.abraham@gmail.com" target="_blank">mark.j.abraham@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<div><br></div><div>That cmake line can't work because you haven't told the shell that some of your spaces are intended to be passed as the arguments. However, you are right that CMake expects a compiler, not an arbitrary string to dump onto a command line. SCALASCA's approach seems to assume that you're using a plain Makefile. You can work around that by providing your own script that does function like a compiler, where you modify the command-line arguments to suit SCALASCA. CMake just calls that script and it's now up to you to construct it so that it works the way SCALASCA needs. (Or ask them to make one, to help their tool be more useful.)</div><div><br></div><div>Mark</div></div><br><div class="gmail_quote"><div><div><div dir="ltr">On Mon, Jun 27, 2016 at 9:43 PM jing liang <<a href="mailto:jingliang2015@gmail.com" target="_blank">jingliang2015@gmail.com</a>> wrote:<br></div></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div dir="ltr">Hi,<div><br></div><div>I am trying to compile GROMACS along with SCALASCA. I compile </div><div>C programs with scalasca using the command:</div><div><br></div><div> /software/bin/scalasca -instrument /software/intel/icc program.c</div><div><br></div><div>Following that idea, I tried to use the CC/C++ environmental variables as follows:</div><div> -DCMAKE_C_COMPILER=/software/bin/scalasca -instrument /software/intel/icc </div><div>-DCMAKE_CXX_COMPILER=/software/bin/scalasca -instrument /software/intel/icpc </div><div><br></div><div>However, it seems that cmake interprets that the compiler is just /software/bin/scalasca and not the entire line: </div><div>/software/bin/scalasca -instrument /software/intel/icc (the same happens with c++)<br></div><div><br></div><div>or maybe the line is too long. </div><div><br></div><div>Do you know if this is the proper way to install GROMACS with SCALASCA</div><div>enabled? Or maybe there is something better?</div><div><br></div><div>Any suggestion on how to include SCALASCA path into the compiler path?</div><div><br></div><div>Here is the complete instruction I am using together with the output. </div><div>The GROMACS version I am trying is 5.0. </div><div><br></div><div>Note: without the SCALASCA path, both icc and icpc compilers are well </div><div>recognized by cmake and I am able to install GROMACS.</div><div><br></div><div>-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</div><div><br></div><div><div>cmake -D CMAKE_INSTALL_PREFIX=${INSTALL_PATH} -DCMAKE_C_COMPILER=/software/bin/scalasca -instrument /software/intel/icc \</div><div>-DCMAKE_CXX_COMPILER=/software/bin/scalasca -instrument /software/intel/icpc \</div><div>-D Boost_INCLUDE_DIR=/software/build03/include -D GMX_FFT_LIBRARY=mkl -D MKL_INCLUDE_DIR=${MKL}/include \</div><div> -D MKL_LIBRARIES=${MKL}/lib/intel64/libmkl_rt.so -D REGRESSIONTEST_PATH=${REGTS} \</div><div> -D REGRESSIONTEST_DOWNLOAD=OFF ${GMX}</div><div>-- The C compiler identification is unknown</div><div>-- The CXX compiler identification is unknown</div><div>-- Check for working C compiler: /software/bin/scalasca</div><div>-- Check for working C compiler: /software/bin/scalasca -- broken</div><div>CMake Error at /software/CMakeTestCCompiler.cmake:61 (message):</div><div> The C compiler</div><div> "/software/bin/scalasca" is not able</div><div> to compile a simple test program.</div><div><br></div><div> It fails with the following output:</div><div><br></div><div> Change Dir: /home/jliang/BUILD_TEST/CMakeFiles/CMakeTmp</div><div><br></div><div> </div><div><br></div><div> Run Build Command:/usr/bin/gmake "cmTryCompileExec1997940207/fast"</div><div><br></div><div> /usr/bin/gmake -f CMakeFiles/cmTryCompileExec1997940207.dir/build.make</div><div> CMakeFiles/cmTryCompileExec1997940207.dir/build</div><div><br></div><div> gmake[1]: Entering directory</div><div> `/home/jliang/BUILD_TEST/CMakeFiles/CMakeTmp'</div><div><br></div><div> /software/bin/cmake -E cmake_progress_report</div><div> /home/jliang/BUILD_TEST/CMakeFiles/CMakeTmp/CMakeFiles 1</div><div><br></div><div> Building C object</div><div> CMakeFiles/cmTryCompileExec1997940207.dir/testCCompiler.c.o</div><div><br></div><div> /software/bin/scalasca -o</div><div> CMakeFiles/cmTryCompileExec1997940207.dir/testCCompiler.c.o -c</div><div> /home/jliang/BUILD_TEST/CMakeFiles/CMakeTmp/testCCompiler.c</div><div><br></div><div> Unexpected argument: -o</div><div><br></div><div> Scalasca 2.1</div><div><br></div><div> Toolset for scalable performance analysis of large-scale parallel</div><div> applications</div><div><br></div><div> usage: scalasca [OPTION]... ACTION <argument>...</div><div><br></div><div> 1. prepare application objects and executable for measurement:</div><div> scalasca -instrument <compile-or-link-command> # skin (using scorep)</div><div> 2. run application under control of measurement system:</div><div> scalasca -analyze <application-launch-command> # scan</div><div> 3. interactively explore measurement analysis report:</div><div> scalasca -examine <experiment-archive|report> # square</div><div><br></div><div> </div><div><br></div><div> Options:</div><div><br></div><div> -c, --show-config show configuration summary and exit</div><div> -h, --help show this help and exit</div><div> -n, --dry-run show actions without taking them</div><div> --quickref show quick reference guide and exit</div><div> -v, --verbose enable verbose commentary</div><div> -V, --version show version information and exit</div><div><br></div><div> </div><div><br></div><div> gmake[1]: *** [CMakeFiles/cmTryCompileExec1997940207.dir/testCCompiler.c.o]</div><div> Error 1</div><div><br></div><div> gmake[1]: Leaving directory</div><div> `/home/jliang/BUILD_TEST/CMakeFiles/CMakeTmp'</div><div><br></div><div> gmake: *** [cmTryCompileExec1997940207/fast] Error 2</div><div><br></div><div> </div><div><br></div><div> </div><div><br></div><div> CMake will not be able to correctly generate this project.</div><div>Call Stack (most recent call first):</div><div> CMakeLists.txt:45 (project)</div><div><br></div><div><br></div><div>-- Configuring incomplete, errors occurred!</div></div><div><br></div><div><br></div><div><br></div><div><br></div></div></div></div><span><font color="#888888">
--<br>
Gromacs Developers mailing list<br>
<br>
* Please search the archive at <a href="http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List" rel="noreferrer" target="_blank">http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List</a> before posting!<br>
<br>
* Can't post? Read <a href="http://www.gromacs.org/Support/Mailing_Lists" rel="noreferrer" target="_blank">http://www.gromacs.org/Support/Mailing_Lists</a><br>
<br>
* For (un)subscribe requests visit<br>
<a href="https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers" rel="noreferrer" target="_blank">https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers</a> or send a mail to <a href="mailto:gmx-developers-request@gromacs.org" target="_blank">gmx-developers-request@gromacs.org</a>.</font></span></blockquote></div>
<br>--<br>
Gromacs Developers mailing list<br>
<br>
* Please search the archive at <a href="http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List" rel="noreferrer" target="_blank">http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List</a> before posting!<br>
<br>
* Can't post? Read <a href="http://www.gromacs.org/Support/Mailing_Lists" rel="noreferrer" target="_blank">http://www.gromacs.org/Support/Mailing_Lists</a><br>
<br>
* For (un)subscribe requests visit<br>
<a href="https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers" rel="noreferrer" target="_blank">https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers</a> or send a mail to <a href="mailto:gmx-developers-request@gromacs.org" target="_blank">gmx-developers-request@gromacs.org</a>.<br></blockquote></div><br></div>
--<br>
Gromacs Developers mailing list<br>
<br>
* Please search the archive at <a href="http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List" rel="noreferrer" target="_blank">http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List</a> before posting!<br>
<br>
* Can't post? Read <a href="http://www.gromacs.org/Support/Mailing_Lists" rel="noreferrer" target="_blank">http://www.gromacs.org/Support/Mailing_Lists</a><br>
<br>
* For (un)subscribe requests visit<br>
<a href="https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers" rel="noreferrer" target="_blank">https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers</a> or send a mail to <a href="mailto:gmx-developers-request@gromacs.org" target="_blank">gmx-developers-request@gromacs.org</a>.</blockquote></div>