Skip to content

Commit 9dc068d

Browse files
authored
Add: critical section to mkdir in backend (#613)
Allows parallel builds on Windows where mkdir complains if directory already exists.
1 parent c39aa47 commit 9dc068d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/fpm_backend.f90

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,9 +268,11 @@ subroutine build_target(model,target,stat)
268268

269269
integer :: fh
270270

271+
!$omp critical
271272
if (.not.exists(dirname(target%output_file))) then
272273
call mkdir(dirname(target%output_file))
273274
end if
275+
!$omp end critical
274276

275277
select case(target%target_type)
276278

0 commit comments

Comments
 (0)