Wednesday, 15 August 2012

fortran - compiling and running a single OpenMP source file with several other non-OpenMP source files -



fortran - compiling and running a single OpenMP source file with several other non-OpenMP source files -

i'm trying compile multiple fortran source files, applied openmp directives 1 of source files. instance :

the compilation flags : compile00='ifort -o3 -openmp -openmp_report -fpconstant -fp-model precise -fpe0 -traceback -ftrapuv' compile0='ifort -o3 -fpconstant -fp-model precise -fpe0 -traceback -ftrapuv' the compiled files : $compile0 -c microprm.f90 modules.f90 $compile0 -c jernewf3p_a.f90 smax.f90 de_mott.f90 twoinitm.f90 helek03.f90 $compile00 -c helek04.f90 $compile0 -c jernewf3p_melt.f90 dmin_g.f90 $compile0 -c submelt_condevap.f90 linking : $compile00 -o tke.x *.o -lm

so source code helek04.f90 has openmp directives. beingness called submelt_condevap.f90 hasn't. right compilation practice ? how should compile using use omp_lib module ? code-safe compile 1 file openmp , link others openmp ?

the compilation aborted. when compiling $compile00 files, simulation runs, gets floating point exception, doesn't occur in serial code.

there couple of issues can arise. unfortunately description not detailed enough. recommend utilize -openmp files, don't see reason making distinction. intel fortran default not create code reentrant , if phone call subroutine has not been compiled -openmp parallel part race conditions can occur. during i/o operations problems quite likely. if have unusual reason avoid -openmp can seek -reentrancy threaded.

if there no calls other code parallel part, , not run concurrently non-parallel part, there shouldn't issues it.

it quite possible have race status or other threading problem in openmp code. utilize tools included in compiler collection debug them. intel inspector xe tool these kinds of problems. utilize options -warn -check -g -traceback have useful checks. valgrind can useful.

fortran openmp fortran90

No comments:

Post a Comment