AnsweredAssumed Answered

AMDuProfCLI does not have permissions to write to a file

Question asked by christianweiss on Apr 22, 2020
Latest reply on Jun 5, 2020 by swarup

Dear all,


I am experimenting with uProf in combination with MPI. I encountered the following problem with file I/O in Fortran. The program


program test_muprof
implicit none
include 'mpif.h'
integer :: istat, ierr
integer :: my_rank, nproc
call MPI_INIT(ierr)
print *, 'DONE'
call MPI_FINALIZE(ierr)

end program test_muprof

is compiled with GNU Fortran 8.2.0 and Open MPI and the "-g" option. Running it without AMDuProf works fine. However, when started together with AMDuProf, I get this error*:

AMDuProfCLI collect `which mpirun` -n 1 `realpath test_muprof`

Profile started ...
At line 11 of file test_muprof.f90 (unit = 11)
Fortran runtime error: Cannot open file 'dummy.file': Permission denied
Error termination. Backtrace:
#0 0x7fcd72ab6ae4 in already_open
at /root/gcc-8.2.0/libgfortran/io/open.c:706
#1 0x400c75 in test_muprof
at /home/cweiss/ispicode/test_muprof.f90:11
#2 0x400d55 in main
at /home/cweiss/ispicode/test_muprof.f90:19
Primary job terminated normally, but 1 process returned
a non-zero exit code.. Per user-direction, the job has been aborted.
mpirun detected that one or more processes exited with non-zero status, thus causing
the job to be terminated. The first process to do so was:
Process name: [[56530,1],0]
Exit code: 2
Profile completed ...
Generated raw file : /tmp/AMDuProf-Apr-22-2020_16-47-40.caperf

Do you have any idea what happens here?


Further infos:

It works fine when I remove the "open" statement from the program.

I have given write permissions to "dummy.file" to everyone on the system, to no avail.

It does not matter if "dummy.file" is already present or not.

The issue also appears with Intel MPI + GNU and Intel MPI + Intel Fortran.





*) I also noted that AMDuProfCLI only works with absolute paths?