2017-10-12 4 views
0

Ich bin ein neuer Benutzer von nvprof und ich habe einen Fehler, wenn ich versucht, nvprof verwenden, um meinen Code zu profilieren. Ich habe meinem Code einige OpenACC-Anweisungen hinzugefügt. Das Cuda-Toolkit, das ich verwendet habe, ist Cuda8.0. Mein Code ist in Fortran90 + OpenMPI geschrieben. Ich habe 16 Kerne für das parallele Rechnen verwendet. Hier ist das Skript, das ich verwenden, um den Code zu übermitteln:Nvidia Visual Profiler Fehler: Kann Profilierungsdatei nicht erstellen

#!/bin/bash -l 
# 
#SBATCH --nodes=1 
#SBATCH --ntasks=16 
#SBATCH --ntasks-per-node=24 
#SBATCH --ntasks-per-core=2 
#SBATCH --cpus-per-task=1 
#SBATCH --constraint=gpu 
#SBATCH --time=24:00:00 
#SBATCH --account=s807 

export OMP_NUM_THREADS=$SLURM_CPUS_PER_TASK 
export CRAY_CUDA_MPS=1 
export TMPDIR=/scratch/snx3000/guow/Incompact3d_GPU/test1 
export PGI_ACC_TIME=1 

set -ex 

# set some parameters 
OUT=log.txt 
#WMIN=1400 
NP=16 


# tasks: $SLURM_NTASKS 
# tasks-per-node: $SLURM_NTASKS_PER_NODE 
# cpus-per-task: $SLURM_CPUS_PER_TASK 
srun nvprof -o nvprof.out ./incompact3d $WMIN >> $OUT 

Der Auftrag wird beendet, nachdem einige Sekunden laufen und ich bekam die Fehlermeldung unter:

+ OUT=log.txt 
+ NP=16 
+ srun nvprof -o nvprof.out ./incompact3d 
==20144== NVPROF is profiling process 20144, command: ./incompact3d 
==20148== NVPROF is profiling process 20148, command: ./incompact3d 
==20140== NVPROF is profiling process 20140, command: ./incompact3d 
==20133== NVPROF is profiling process 20133, command: ./incompact3d 
==20134== NVPROF is profiling process 20134, command: ./incompact3d 
==20150== NVPROF is profiling process 20150, command: ./incompact3d 
==20146== NVPROF is profiling process 20146, command: ./incompact3d 
==20128== NVPROF is profiling process 20128, command: ./incompact3d 
==20154== NVPROF is profiling process 20154, command: ./incompact3d 
==20156== NVPROF is profiling process 20156, command: ./incompact3d 
==20152== NVPROF is profiling process 20152, command: ./incompact3d 
==20136== NVPROF is profiling process 20136, command: ./incompact3d 
==20130== NVPROF is profiling process 20130, command: ./incompact3d 
==20158== NVPROF is profiling process 20158, command: ./incompact3d 
==20138== NVPROF is profiling process 20138, command: ./incompact3d 
==20142== NVPROF is profiling process 20142, command: ./incompact3d 
==20146== Error: Cannot create profiling file: /scratch/snx3000/guow/Incompact3d_GPU/test2_OpenAcc/nvprof.out 
==20142== Error: Cannot create profiling file: /scratch/snx3000/guow/Incompact3d_GPU/test2_OpenAcc/nvprof.out 
==20138== Error: Cannot create profiling file: /scratch/snx3000/guow/Incompact3d_GPU/test2_OpenAcc/nvprof.out 
==20133== Error: Cannot create profiling file: /scratch/snx3000/guow/Incompact3d_GPU/test2_OpenAcc/nvprof.out 
==20134== Error: Cannot create profiling file: /scratch/snx3000/guow/Incompact3d_GPU/test2_OpenAcc/nvprof.out 
==20136== Error: Cannot create profiling file: /scratch/snx3000/guow/Incompact3d_GPU/test2_OpenAcc/nvprof.out 
==20156== Error: Cannot create profiling file: /scratch/snx3000/guow/Incompact3d_GPU/test2_OpenAcc/nvprof.out 
srun: First task exited 30s ago 
srun: tasks 0,4,6-7,9-13: running 
srun: tasks 1-3,5,8,14-15: exited 
srun: Terminating job step 3892463.0 
slurmstepd: error: *** STEP 3892463.0 ON nid04439 CANCELLED AT 2017-10-12T15:04:00 *** 
srun: Job step aborted: Waiting up to 32 seconds for job step to finish. 
srun: error: nid04439: tasks 0,4,6-7,9-13: Killed 
srun: Terminating job step 3892463.0 

Eine nvprof.out-Datei generiert wird, aber Wenn ich den Befehl "nvvp nvprof.out" verwende, wird nichts angezeigt. Haben Sie schon einmal solche Situationen erlebt? Irgendwelche Vorschläge werden geschätzt!

Antwort

2

Versuchen Sie den Befehl:

srun nvprof -o nvprof.%p.out ./incompact3d $WMIN >> $OUT 

„% p“ für jeden MPI Rang mit dem Prozess-ID erhalten ausgefüllt, so dass jeder Rang ausgibt es Profil auf verschiedene Dateien. Andernfalls versuchen alle Ränge, dieselbe Datei zu verwenden, die Probleme verursachen kann.

+0

Hallo Mat, danke für deine Antwort. Es funktioniert, wenn ich% p hinzufüge. Es kann 16 Ausgabedateien erzeugen. Aber wenn ich diese 16 Ausgabedateien nach nvprof importiere, wird nichts in den GPU-Details, CPU details label angezeigt. Und ich kann nur die Timeline-Reihe von OpenACC sehen. Wenn ich im Analyse-Label auf "GPU-Nutzung prüfen" klicke, wird "Keine GPU-Geräte" angezeigt. Aber der Code wird auf CPU und GPU ausgeführt. Können Sie mir sagen, wie ich die GPU, CPU-Details und andere Timeline-Informationen anzeigen kann? –

+0

Wenn Code auf der GPU ausgeführt wird, sollten GPU-Informationen vorhanden sein. Wenn jedoch die Knoten "libcupti.so" nicht installiert haben, könnte das erklären, warum die Informationen fehlen. CUPTI ist die Profiler-Bibliothek, die mit dem Gerät verbunden ist. Eine andere Möglichkeit besteht darin, dass Sie den OpenACC-Code für das von Ihnen verwendete Gerät nicht erstellt haben. Welche "-ta" Optionen haben Sie an den Compiler übergeben? Welches Gerät verwendest du? Für das CPU-Profiling müssen Sie die Option "--cpu-profiling on" zu nvprof hinzufügen oder pgprof verwenden, das standardmäßig die CPU-Profilerstellung aktiviert. –

+0

Danke für Ihre Antwort! Die Option -ta, die ich verwendet habe, ist -ta = tesla: cuda8.0. Ich führe meine Simulation auf Cray XC50. Der Rechenknoten ist Intel® Xeon® E5-2690 v3 @ 2,60 GHz (12 Kerne, 64 GB RAM) und NVIDIA® Tesla® P100 16 GB. Ich habe die Option "--cpu-profilling on" hinzugefügt und einen einzelnen Kern zum Berechnen verwendet. Jetzt kann ich das CPU Profiling sehen. –

Verwandte Themen