loopprofileviewer can't parse xml file

loopprofileviewer can't parse xml file

Hello,

I am not sure this is the right forum, but I hope someone can help me out.

I am running an parallel program (using Intel MPI) compiled with icc (composer_xe_2013.3.163) under Linux. In my Makefile, I added the options:

-profile-functions -profile-loops=all -profile-loops-report=2

in order to get some profiling information.To run the code, I did:

mpiexec.hydra -n 20  -hostfile cluster_file_localhost.txt ./close_loop > close1_10jobs.txt

(the mpiexec comes from: /opt/intel/impi/4.1.0.024/intel64/bin/mpiexec.hydra)

The code completed fine, and there was an output XML file (and the dump files). I then tried to use /opt/intel/composer_xe_2013.3.163/bin/intel64/loopprofileviewer.csh to analyze the resulting XML file. The java GUI starts, but reports an error by popping up a window:

"Failed to parse input file"

Once I click ok, the GUI starts and pops another window: "Unable to open file: [...]'. I can see the file using Open, but it doesn't open it. On the command line, I see the following error apperaing:

[Fatal Error] loop_prof_1365148121.xml:13750:1: Content is not allowed in trailing section.

My programm is iterative, so I tried reducing the number of loops (to see if perhaps the XML file was too large). This didn't solve the problem, but the command line error message is slightly different:

[Fatal Error] loop_prof_1365148865.xml:7761:45: The element type "loop" must be terminated by the matching end-tag "</loop>".

Looking at the XML file doesn't show anything "obvious". But I am no XML expert...

Any ideas on how I could understand what's going on ?

I have attached an example XML file to the end of this message (but had to rename the file from .xml to .xml.txt - don't understand why), so maybe someone can see if the problem is the XML file itself (maybe I did something wrong compiling) or the profiler.

Any ideas welcome....

Thanks!

Miska

AnexoTamanho
Download loop-prof-1365148121.xml.txt424.47 KB
17 posts / novo 0
Último post
Para obter mais informações sobre otimizações de compiladores, consulte Aviso sobre otimizações.

>>...The java GUI starts, but reports an error by popping up a window:
>>
>>"Failed to parse input file"

Reproduced error on a WIndows platform and it is clearly a bug. Take a look at a screenshot:

Anexos: 

AnexoTamanho
Download loopprofileerror.jpg20.44 KB

>>...The java GUI starts, but reports an error by popping up a window:
>>
>>"Failed to parse input file"

Reproduced error on a WIndows platform and it is clearly a bug. Take a look at attached screenshot.

Anexos: 

AnexoTamanho
Download loopprofileerror.jpg20.44 KB

Here is additional information from a console window:
...
..\Composer XE 2011 SP1\Bin\Ia32>loopprofileviewer.bat
[Fatal Error] loop-prof-1365148121.xml:13750:1: Content is not allowed in trailing section.
[Fatal Error] loop-prof-1365148121.xml:13750:1: Content is not allowed in trailing section.
[Fatal Error] loop-prof-1365148121.xml:13750:1: Content is not allowed in trailing section.
...
It looks like there is a problem with the xml-file.

Hi,

Thanks for the input. Some further progress on my side:

If I use:

-profile-functions -profile-loops-report=2

I can produce an XML file that works. The combination of options that don't work:

-profile-functions -profile-loops=all -profile-loops-report=2

-profile-functions -profile-loops=all

-profile-functions -profile-loops-report=2

-profile-loops=all -profile-loops-report=2

It does seem like a bug somewhere...

Thanks for helping !

Miska

Could you post a complete command line of Intel C++ compiler, please?

Hello,

Here is an example. Sorry it's so ugly, I'm trying to transition from gcc and had a lot of trouble linking, so I trew a lot of arguments at the command line, until it finally compiles, links and yes - even gives the correct results...

/opt/intel/impi/4.1.0.024/intel64//bin/mpicc -I/home/miska/gsl-1.14_icc/include/ -I/NFS/Compiled_with_gcc4.5.1/fftw-2.1.5/include -I/opt/intel/composer_xe_2013.3.163/mkl/include/fftw/include -I/opt/intel/impi/4.1.0.024/intel64//include  -cc=/opt/intel/composer_xe_2013.3.163/bin/intel64/icc -D_LARGEFILE_SOURCE -O3 -profile-functions -profile-loops=all -profile-loops-report=2 -D_FILE_OFFSET_BITS=64 -DLARGE_FILES -DPUPIL_FLOAT  -DPHOTON_DOUBLE -DMCAO_PARAMETERS_FILE='"mcao_parameters__scao_40x40_mvm_SPHERE_highflux_gain04_2layers_2048.c"' -DBASEFILENAME='"scao_40x40_mvm_SPHERE_highflux_gain04_2layers_2048"' -L/opt/intel/composer_xe_2013.3.163/mkl -IKLINCLUDE /opt/intel/composer_xe_2013.3.163/mkl/lib/intel64/libmkl_scalapack_lp64.a /opt/intel/composer_xe_2013.3.163/mkl/lib/intel64/libmkl_blacs_intelmpi_lp64.a /opt/intel/composer_xe_2013.3.163/mkl/lib/intel64/libmkl_intel_lp64.a /opt/intel/composer_xe_2013.3.163/mkl/lib/intel64/libmkl_sequential.a /opt/intel/composer_xe_2013.3.163/mkl/lib/intel64/libmkl_core.a /opt/intel/composer_xe_2013.3.163/mkl/lib/intel64/libfftw2xc_double_intel.a /opt/intel/composer_xe_2013.3.163/mkl/lib/intel64/libfftw2xc_single_intel.a /opt/intel/composer_xe_2013.3.163/mkl/lib/intel64/libfftw2x_cdft_DOUBLE_lp64.a /opt/intel/composer_xe_2013.3.163/mkl/lib/intel64/libfftw2x_cdft_SINGLE_lp64.a  -lpthread -lm -I/home/miska/AOapi_new_O3_1_12_04_noHDF5/CppAOapi/include -I/NFS/Compiled_with_gcc4.5.1/fftw-2.1.5/include -I/opt/intel/composer_xe_2013.3.163/mkl/include/fftw/include -I/home/miska/gsl-1.14_icc/include  -L/opt/intel/composer_xe_2013.3.163/mkl/lib/intel64 -lmkl_scalapack_lp64 -lmkl_cdft_core -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lmkl_blacs_intelmpi_lp64 -lpthread -lm  -DMKL_LP64 -I/opt/intel/composer_xe_2013.3.163/mkl/include  -c  -DPUPIL_FLOAT  -DPHOTON_DOUBLE  -O3 -profile-functions -profile-loops=all -profile-loops-report=2  -cc=/opt/intel/composer_xe_2013.3.163/bin/intel64/icc -c main_sh.c

Thanks again for your help...

Miska

>>...I'm trying to transition from gcc and had a lot of trouble linking...

Thanks and I'll take a look.

>>Here is additional information from a console window:
>>...
>>..\Composer XE 2011 SP1\Bin\Ia32>loopprofileviewer.bat
>>...
>>[Fatal Error] loop-prof-1365148121.xml:13750:1: Content is not allowed in trailing section.
>>...
>>It looks like there is a problem with the xml-file.

I confirm that there is a problem with the xml-file ( it is corrupted ) and take a look at a line 13750. If you delete All content after the line 13750 the viewer will work. Here is a screenshot:

Anexos: 

AnexoTamanho
Download loopprofileviewer.jpg226.37 KB

Let me know if you need corrected xml-file.

Hi !

Yes, I confirm - deleting everything after line 13750 (included) works. At least I can start using the tool. It would be nice to understand where this behaviour comes from - but as I said, at least now I can start to use the it.

Thanks so much !

Miska

Hi,

Some extra information, which may help to identify the problem. Running the same executable, with the exact same command line, changes the behaviour of the XML file. So it could be that this is an issue with the fact I am running the code through MPI. Maybe several processes try to write to the same XML file at the same time ?

I managed to get  XML files that work. It could be (I have to run more tests) that running exactly the same executable twice, at the second run, produces a correct XML file. Hmmmm. Sounds weird !

Miska

>>...Maybe several processes try to write to the same XML file at the same time?..

It is possible and you need to try to create the report with only one process running.

Please take a look at your command line and some options are used twice ( I marked duplicates ):

/opt/intel/impi/4.1.0.024/intel64//bin/mpicc
-I/home/miska/gsl-1.14_icc/include/
-I/NFS/Compiled_with_gcc4.5.1/fftw-2.1.5/include
-I/opt/intel/composer_xe_2013.3.163/mkl/include/fftw/include
-I/opt/intel/impi/4.1.0.024/intel64//include
-cc=/opt/intel/composer_xe_2013.3.163/bin/intel64/icc
-D_LARGEFILE_SOURCE

-O3
-profile-functions
-profile-loops=all
-profile-loops-report=2

-D_FILE_OFFSET_BITS=64
-DLARGE_FILES
-DPUPIL_FLOAT
-DPHOTON_DOUBLE
-DMCAO_PARAMETERS_FILE='"mcao_parameters__scao_40x40_mvm_SPHERE_highflux_gain04_2layers_2048.c"'
-DBASEFILENAME='"scao_40x40_mvm_SPHERE_highflux_gain04_2layers_2048"'
-L/opt/intel/composer_xe_2013.3.163/mkl
-IKLINCLUDE /opt/intel/composer_xe_2013.3.163/mkl/lib/intel64/libmkl_scalapack_lp64.a
/opt/intel/composer_xe_2013.3.163/mkl/lib/intel64/libmkl_blacs_intelmpi_lp64.a
/opt/intel/composer_xe_2013.3.163/mkl/lib/intel64/libmkl_intel_lp64.a
/opt/intel/composer_xe_2013.3.163/mkl/lib/intel64/libmkl_sequential.a
/opt/intel/composer_xe_2013.3.163/mkl/lib/intel64/libmkl_core.a
/opt/intel/composer_xe_2013.3.163/mkl/lib/intel64/libfftw2xc_double_intel.a
/opt/intel/composer_xe_2013.3.163/mkl/lib/intel64/libfftw2xc_single_intel.a
/opt/intel/composer_xe_2013.3.163/mkl/lib/intel64/libfftw2x_cdft_DOUBLE_lp64.a
/opt/intel/composer_xe_2013.3.163/mkl/lib/intel64/libfftw2x_cdft_SINGLE_lp64.a
-lpthread
-lm
-I/home/miska/AOapi_new_O3_1_12_04_noHDF5/CppAOapi/include
-I/NFS/Compiled_with_gcc4.5.1/fftw-2.1.5/include
-I/opt/intel/composer_xe_2013.3.163/mkl/include/fftw/include
-I/home/miska/gsl-1.14_icc/include
-L/opt/intel/composer_xe_2013.3.163/mkl/lib/intel64
-lmkl_scalapack_lp64
-lmkl_cdft_core
-lmkl_intel_lp64
-lmkl_sequential
-lmkl_core
-lmkl_blacs_intelmpi_lp64
-lpthread
-lm
-DMKL_LP64
-I/opt/intel/composer_xe_2013.3.163/mkl/include
-c
-DPUPIL_FLOAT
-DPHOTON_DOUBLE

-O3
-profile-functions
-profile-loops=all
-profile-loops-report=2

-cc=/opt/intel/composer_xe_2013.3.163/bin/intel64/icc
-c
main_sh.c

Hi,

I  removed the extra arguments, but the problem remains. Also running the code several times produces errors at different lines in the XML. If I am lucky, no error at all (but that seems rare).

I cannot run the code in a single process, I tried however to reduce the number of MPI processes I am using (20 by defult). With only 4 threads, it seems the XML comes out ok. So it definitely seems related to the fact I am running MPI...

Thanks !

Miska

There may be methods to collect data separately for each MPI process, or to turn on profiling for only one process.  As Sergey hinted, with several processes collecting their own data but writing them to the same file, without locking, anything could happen. 

I've been dismayed myself to see that these profiling options are intended only for single thread execution.  Of course, they won't give you information about the mkl library function calls.

Hi!

How did you get the -profile-functions option to work?

I tried it and in the results I see only main()...

Deixar um comentário

Faça login para adicionar um comentário. Não é membro? Inscreva-se hoje mesmo!