|
![](https://seccdn.libravatar.org/avatar/fec05c4ec364a789aeda37b99c85d1db48b437c393d3d7c17be8d076c0f70f67?s=16&d=retro) |
0911f37 |
https://bugzilla.redhat.com/show_bug.cgi?id=533176#c4
|
|
![](https://seccdn.libravatar.org/avatar/fec05c4ec364a789aeda37b99c85d1db48b437c393d3d7c17be8d076c0f70f67?s=16&d=retro) |
0911f37 |
|
|
![](https://seccdn.libravatar.org/avatar/fec05c4ec364a789aeda37b99c85d1db48b437c393d3d7c17be8d076c0f70f67?s=16&d=retro) |
0911f37 |
I find it a bug in DWARF and gdb behaves correctly according to it. From the
|
|
![](https://seccdn.libravatar.org/avatar/fec05c4ec364a789aeda37b99c85d1db48b437c393d3d7c17be8d076c0f70f67?s=16&d=retro) |
0911f37 |
current DWARF's point of view the is a function call which you skip by "next".
|
|
![](https://seccdn.libravatar.org/avatar/fec05c4ec364a789aeda37b99c85d1db48b437c393d3d7c17be8d076c0f70f67?s=16&d=retro) |
0911f37 |
|
|
![](https://seccdn.libravatar.org/avatar/fec05c4ec364a789aeda37b99c85d1db48b437c393d3d7c17be8d076c0f70f67?s=16&d=retro) |
0911f37 |
If you hide any /usr/lib/debug such as using:
|
|
![](https://seccdn.libravatar.org/avatar/fec05c4ec364a789aeda37b99c85d1db48b437c393d3d7c17be8d076c0f70f67?s=16&d=retro) |
0911f37 |
gdb -nx -ex 'set debug-file-directory /qwe' -ex 'file ./tpcommon_gfortran44'
|
|
![](https://seccdn.libravatar.org/avatar/fec05c4ec364a789aeda37b99c85d1db48b437c393d3d7c17be8d076c0f70f67?s=16&d=retro) |
0911f37 |
and use "step" command instead of "next" there it will work.
|
|
![](https://seccdn.libravatar.org/avatar/fec05c4ec364a789aeda37b99c85d1db48b437c393d3d7c17be8d076c0f70f67?s=16&d=retro) |
0911f37 |
(You need to hide debuginfo from libgomp as you would step into libgomp sources
|
|
![](https://seccdn.libravatar.org/avatar/fec05c4ec364a789aeda37b99c85d1db48b437c393d3d7c17be8d076c0f70f67?s=16&d=retro) |
0911f37 |
to maintain the threads for execution.)
|
|
![](https://seccdn.libravatar.org/avatar/fec05c4ec364a789aeda37b99c85d1db48b437c393d3d7c17be8d076c0f70f67?s=16&d=retro) |
0911f37 |
|
|
![](https://seccdn.libravatar.org/avatar/fec05c4ec364a789aeda37b99c85d1db48b437c393d3d7c17be8d076c0f70f67?s=16&d=retro) |
0911f37 |
There should be some DWARF extension for it, currently tried to detect
|
|
![](https://seccdn.libravatar.org/avatar/fec05c4ec364a789aeda37b99c85d1db48b437c393d3d7c17be8d076c0f70f67?s=16&d=retro) |
0911f37 |
substring ".omp_fn." as this function is called "MAIN__.omp_fn.0" and do not
|
|
![](https://seccdn.libravatar.org/avatar/fec05c4ec364a789aeda37b99c85d1db48b437c393d3d7c17be8d076c0f70f67?s=16&d=retro) |
0911f37 |
consider such sub-function as a skippable by "next".
|
|
![](https://seccdn.libravatar.org/avatar/fec05c4ec364a789aeda37b99c85d1db48b437c393d3d7c17be8d076c0f70f67?s=16&d=retro) |
0911f37 |
|
|
![](https://seccdn.libravatar.org/avatar/fec05c4ec364a789aeda37b99c85d1db48b437c393d3d7c17be8d076c0f70f67?s=16&d=retro) |
0911f37 |
Another problem is that with "set scheduler-locking" being "off" (default
|
|
![](https://seccdn.libravatar.org/avatar/fec05c4ec364a789aeda37b99c85d1db48b437c393d3d7c17be8d076c0f70f67?s=16&d=retro) |
0911f37 |
upstream) or "step" (default in F/RHEL) the simultaneous execution of the
|
|
![](https://seccdn.libravatar.org/avatar/fec05c4ec364a789aeda37b99c85d1db48b437c393d3d7c17be8d076c0f70f67?s=16&d=retro) |
0911f37 |
threads is inconvenient. Setting it to "on" will lockup the debugging as the
|
|
![](https://seccdn.libravatar.org/avatar/fec05c4ec364a789aeda37b99c85d1db48b437c393d3d7c17be8d076c0f70f67?s=16&d=retro) |
0911f37 |
threads need to get synchronized at some point. This is a more general
|
|
![](https://seccdn.libravatar.org/avatar/fec05c4ec364a789aeda37b99c85d1db48b437c393d3d7c17be8d076c0f70f67?s=16&d=retro) |
0911f37 |
debugging problem of GOMP outside of the scope of this Bug.
|
|
![](https://seccdn.libravatar.org/avatar/fec05c4ec364a789aeda37b99c85d1db48b437c393d3d7c17be8d076c0f70f67?s=16&d=retro) |
0911f37 |
|
|
![](https://seccdn.libravatar.org/avatar/fec05c4ec364a789aeda37b99c85d1db48b437c393d3d7c17be8d076c0f70f67?s=16&d=retro) |
0911f37 |
|
|
![](https://seccdn.libravatar.org/avatar/fec05c4ec364a789aeda37b99c85d1db48b437c393d3d7c17be8d076c0f70f67?s=16&d=retro) |
0911f37 |
|
|
Jan Kratochvil |
eb6cb2d |
Index: gdb-7.7.90.20140613/gdb/infrun.c
|
|
Jan Kratochvil |
6fa2f55 |
===================================================================
|
|
Jan Kratochvil |
eb6cb2d |
--- gdb-7.7.90.20140613.orig/gdb/infrun.c 2014-06-13 21:59:10.835805512 +0200
|
|
Jan Kratochvil |
eb6cb2d |
+++ gdb-7.7.90.20140613/gdb/infrun.c 2014-06-13 21:59:31.064829121 +0200
|
|
Jan Kratochvil |
eb6cb2d |
@@ -4820,6 +4820,16 @@ process_event_stop_test (struct executio
|
|
![](https://seccdn.libravatar.org/avatar/fec05c4ec364a789aeda37b99c85d1db48b437c393d3d7c17be8d076c0f70f67?s=16&d=retro) |
0911f37 |
|
|
Jan Kratochvil |
6fa2f55 |
if (ecs->event_thread->control.step_over_calls == STEP_OVER_ALL)
|
|
![](https://seccdn.libravatar.org/avatar/fec05c4ec364a789aeda37b99c85d1db48b437c393d3d7c17be8d076c0f70f67?s=16&d=retro) |
0911f37 |
{
|
|
![](https://seccdn.libravatar.org/avatar/fec05c4ec364a789aeda37b99c85d1db48b437c393d3d7c17be8d076c0f70f67?s=16&d=retro) |
0911f37 |
+ struct symbol *stop_fn = find_pc_function (stop_pc);
|
|
Jan Kratochvil |
872aab0 |
+ struct minimal_symbol *stopf = lookup_minimal_symbol_by_pc (stop_pc).minsym;
|
|
![](https://seccdn.libravatar.org/avatar/fec05c4ec364a789aeda37b99c85d1db48b437c393d3d7c17be8d076c0f70f67?s=16&d=retro) |
0911f37 |
+
|
|
Jan Kratochvil |
556378e |
+ if ((stop_fn == NULL
|
|
Jan Kratochvil |
556378e |
+ || strstr (SYMBOL_LINKAGE_NAME (stop_fn), ".omp_fn.") == NULL)
|
|
Jan Kratochvil |
556378e |
+ /* gcc-4.7.2-9.fc19.x86_64 uses a new format. */
|
|
Jan Kratochvil |
556378e |
+ && (stopf == NULL
|
|
Jan Kratochvil |
eb6cb2d |
+ || strstr (MSYMBOL_LINKAGE_NAME (stopf), "._omp_fn.") == NULL))
|
|
![](https://seccdn.libravatar.org/avatar/fec05c4ec364a789aeda37b99c85d1db48b437c393d3d7c17be8d076c0f70f67?s=16&d=retro) |
0911f37 |
+{ /* ".omp_fn." */
|
|
![](https://seccdn.libravatar.org/avatar/fec05c4ec364a789aeda37b99c85d1db48b437c393d3d7c17be8d076c0f70f67?s=16&d=retro) |
0911f37 |
+
|
|
![](https://seccdn.libravatar.org/avatar/fec05c4ec364a789aeda37b99c85d1db48b437c393d3d7c17be8d076c0f70f67?s=16&d=retro) |
0911f37 |
/* We're doing a "next".
|
|
![](https://seccdn.libravatar.org/avatar/fec05c4ec364a789aeda37b99c85d1db48b437c393d3d7c17be8d076c0f70f67?s=16&d=retro) |
0911f37 |
|
|
![](https://seccdn.libravatar.org/avatar/fec05c4ec364a789aeda37b99c85d1db48b437c393d3d7c17be8d076c0f70f67?s=16&d=retro) |
0911f37 |
Normal (forward) execution: set a breakpoint at the
|
|
Jan Kratochvil |
eb6cb2d |
@@ -4855,6 +4865,7 @@ process_event_stop_test (struct executio
|
|
![](https://seccdn.libravatar.org/avatar/fec05c4ec364a789aeda37b99c85d1db48b437c393d3d7c17be8d076c0f70f67?s=16&d=retro) |
0911f37 |
|
|
![](https://seccdn.libravatar.org/avatar/fec05c4ec364a789aeda37b99c85d1db48b437c393d3d7c17be8d076c0f70f67?s=16&d=retro) |
0911f37 |
keep_going (ecs);
|
|
![](https://seccdn.libravatar.org/avatar/fec05c4ec364a789aeda37b99c85d1db48b437c393d3d7c17be8d076c0f70f67?s=16&d=retro) |
0911f37 |
return;
|
|
![](https://seccdn.libravatar.org/avatar/fec05c4ec364a789aeda37b99c85d1db48b437c393d3d7c17be8d076c0f70f67?s=16&d=retro) |
0911f37 |
+} /* ".omp_fn." */
|
|
![](https://seccdn.libravatar.org/avatar/fec05c4ec364a789aeda37b99c85d1db48b437c393d3d7c17be8d076c0f70f67?s=16&d=retro) |
0911f37 |
}
|
|
![](https://seccdn.libravatar.org/avatar/fec05c4ec364a789aeda37b99c85d1db48b437c393d3d7c17be8d076c0f70f67?s=16&d=retro) |
0911f37 |
|
|
![](https://seccdn.libravatar.org/avatar/fec05c4ec364a789aeda37b99c85d1db48b437c393d3d7c17be8d076c0f70f67?s=16&d=retro) |
0911f37 |
/* If we are in a function call trampoline (a stub between the
|
|
Jan Kratochvil |
eb6cb2d |
Index: gdb-7.7.90.20140613/gdb/testsuite/gdb.fortran/omp-step.exp
|
|
Jan Kratochvil |
6fa2f55 |
===================================================================
|
|
Jan Kratochvil |
6fa2f55 |
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
|
Jan Kratochvil |
eb6cb2d |
+++ gdb-7.7.90.20140613/gdb/testsuite/gdb.fortran/omp-step.exp 2014-06-13 21:59:22.801819481 +0200
|
|
![](https://seccdn.libravatar.org/avatar/fec05c4ec364a789aeda37b99c85d1db48b437c393d3d7c17be8d076c0f70f67?s=16&d=retro) |
0911f37 |
@@ -0,0 +1,31 @@
|
|
![](https://seccdn.libravatar.org/avatar/fec05c4ec364a789aeda37b99c85d1db48b437c393d3d7c17be8d076c0f70f67?s=16&d=retro) |
0911f37 |
+# Copyright 2009 Free Software Foundation, Inc.
|
|
![](https://seccdn.libravatar.org/avatar/fec05c4ec364a789aeda37b99c85d1db48b437c393d3d7c17be8d076c0f70f67?s=16&d=retro) |
0911f37 |
+
|
|
![](https://seccdn.libravatar.org/avatar/fec05c4ec364a789aeda37b99c85d1db48b437c393d3d7c17be8d076c0f70f67?s=16&d=retro) |
0911f37 |
+# This program is free software; you can redistribute it and/or modify
|
|
![](https://seccdn.libravatar.org/avatar/fec05c4ec364a789aeda37b99c85d1db48b437c393d3d7c17be8d076c0f70f67?s=16&d=retro) |
0911f37 |
+# it under the terms of the GNU General Public License as published by
|
|
![](https://seccdn.libravatar.org/avatar/fec05c4ec364a789aeda37b99c85d1db48b437c393d3d7c17be8d076c0f70f67?s=16&d=retro) |
0911f37 |
+# the Free Software Foundation; either version 3 of the License, or
|
|
![](https://seccdn.libravatar.org/avatar/fec05c4ec364a789aeda37b99c85d1db48b437c393d3d7c17be8d076c0f70f67?s=16&d=retro) |
0911f37 |
+# (at your option) any later version.
|
|
![](https://seccdn.libravatar.org/avatar/fec05c4ec364a789aeda37b99c85d1db48b437c393d3d7c17be8d076c0f70f67?s=16&d=retro) |
0911f37 |
+#
|
|
![](https://seccdn.libravatar.org/avatar/fec05c4ec364a789aeda37b99c85d1db48b437c393d3d7c17be8d076c0f70f67?s=16&d=retro) |
0911f37 |
+# This program is distributed in the hope that it will be useful,
|
|
![](https://seccdn.libravatar.org/avatar/fec05c4ec364a789aeda37b99c85d1db48b437c393d3d7c17be8d076c0f70f67?s=16&d=retro) |
0911f37 |
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
![](https://seccdn.libravatar.org/avatar/fec05c4ec364a789aeda37b99c85d1db48b437c393d3d7c17be8d076c0f70f67?s=16&d=retro) |
0911f37 |
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
![](https://seccdn.libravatar.org/avatar/fec05c4ec364a789aeda37b99c85d1db48b437c393d3d7c17be8d076c0f70f67?s=16&d=retro) |
0911f37 |
+# GNU General Public License for more details.
|
|
![](https://seccdn.libravatar.org/avatar/fec05c4ec364a789aeda37b99c85d1db48b437c393d3d7c17be8d076c0f70f67?s=16&d=retro) |
0911f37 |
+#
|
|
![](https://seccdn.libravatar.org/avatar/fec05c4ec364a789aeda37b99c85d1db48b437c393d3d7c17be8d076c0f70f67?s=16&d=retro) |
0911f37 |
+# You should have received a copy of the GNU General Public License
|
|
![](https://seccdn.libravatar.org/avatar/fec05c4ec364a789aeda37b99c85d1db48b437c393d3d7c17be8d076c0f70f67?s=16&d=retro) |
0911f37 |
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
![](https://seccdn.libravatar.org/avatar/fec05c4ec364a789aeda37b99c85d1db48b437c393d3d7c17be8d076c0f70f67?s=16&d=retro) |
0911f37 |
+
|
|
![](https://seccdn.libravatar.org/avatar/fec05c4ec364a789aeda37b99c85d1db48b437c393d3d7c17be8d076c0f70f67?s=16&d=retro) |
0911f37 |
+set testfile "omp-step"
|
|
![](https://seccdn.libravatar.org/avatar/fec05c4ec364a789aeda37b99c85d1db48b437c393d3d7c17be8d076c0f70f67?s=16&d=retro) |
0911f37 |
+set srcfile ${testfile}.f90
|
|
Jan Kratochvil |
3b55f78 |
+if { [prepare_for_testing $testfile.exp $testfile $srcfile {debug f90 additional_flags=-fopenmp}] } {
|
|
![](https://seccdn.libravatar.org/avatar/fec05c4ec364a789aeda37b99c85d1db48b437c393d3d7c17be8d076c0f70f67?s=16&d=retro) |
0911f37 |
+ return -1
|
|
![](https://seccdn.libravatar.org/avatar/fec05c4ec364a789aeda37b99c85d1db48b437c393d3d7c17be8d076c0f70f67?s=16&d=retro) |
0911f37 |
+}
|
|
![](https://seccdn.libravatar.org/avatar/fec05c4ec364a789aeda37b99c85d1db48b437c393d3d7c17be8d076c0f70f67?s=16&d=retro) |
0911f37 |
+
|
|
![](https://seccdn.libravatar.org/avatar/fec05c4ec364a789aeda37b99c85d1db48b437c393d3d7c17be8d076c0f70f67?s=16&d=retro) |
0911f37 |
+if ![runto [gdb_get_line_number "start-here"]] {
|
|
![](https://seccdn.libravatar.org/avatar/fec05c4ec364a789aeda37b99c85d1db48b437c393d3d7c17be8d076c0f70f67?s=16&d=retro) |
0911f37 |
+ perror "Couldn't run to start-here"
|
|
![](https://seccdn.libravatar.org/avatar/fec05c4ec364a789aeda37b99c85d1db48b437c393d3d7c17be8d076c0f70f67?s=16&d=retro) |
0911f37 |
+ return 0
|
|
![](https://seccdn.libravatar.org/avatar/fec05c4ec364a789aeda37b99c85d1db48b437c393d3d7c17be8d076c0f70f67?s=16&d=retro) |
0911f37 |
+}
|
|
![](https://seccdn.libravatar.org/avatar/fec05c4ec364a789aeda37b99c85d1db48b437c393d3d7c17be8d076c0f70f67?s=16&d=retro) |
0911f37 |
+
|
|
![](https://seccdn.libravatar.org/avatar/fec05c4ec364a789aeda37b99c85d1db48b437c393d3d7c17be8d076c0f70f67?s=16&d=retro) |
0911f37 |
+gdb_test "next" {!\$omp parallel} "step closer"
|
|
![](https://seccdn.libravatar.org/avatar/fec05c4ec364a789aeda37b99c85d1db48b437c393d3d7c17be8d076c0f70f67?s=16&d=retro) |
0911f37 |
+gdb_test "next" {a\(omp_get_thread_num\(\) \+ 1\) = 1} "step into omp"
|
|
![](https://seccdn.libravatar.org/avatar/fec05c4ec364a789aeda37b99c85d1db48b437c393d3d7c17be8d076c0f70f67?s=16&d=retro) |
0911f37 |
+
|
|
![](https://seccdn.libravatar.org/avatar/fec05c4ec364a789aeda37b99c85d1db48b437c393d3d7c17be8d076c0f70f67?s=16&d=retro) |
0911f37 |
+gdb_breakpoint [gdb_get_line_number "success"]
|
|
![](https://seccdn.libravatar.org/avatar/fec05c4ec364a789aeda37b99c85d1db48b437c393d3d7c17be8d076c0f70f67?s=16&d=retro) |
0911f37 |
+gdb_continue_to_breakpoint "success" ".*success.*"
|
|
Jan Kratochvil |
eb6cb2d |
Index: gdb-7.7.90.20140613/gdb/testsuite/gdb.fortran/omp-step.f90
|
|
Jan Kratochvil |
6fa2f55 |
===================================================================
|
|
Jan Kratochvil |
6fa2f55 |
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
|
Jan Kratochvil |
eb6cb2d |
+++ gdb-7.7.90.20140613/gdb/testsuite/gdb.fortran/omp-step.f90 2014-06-13 21:59:22.801819481 +0200
|
|
![](https://seccdn.libravatar.org/avatar/fec05c4ec364a789aeda37b99c85d1db48b437c393d3d7c17be8d076c0f70f67?s=16&d=retro) |
0911f37 |
@@ -0,0 +1,32 @@
|
|
![](https://seccdn.libravatar.org/avatar/fec05c4ec364a789aeda37b99c85d1db48b437c393d3d7c17be8d076c0f70f67?s=16&d=retro) |
0911f37 |
+! Copyright 2009 Free Software Foundation, Inc.
|
|
![](https://seccdn.libravatar.org/avatar/fec05c4ec364a789aeda37b99c85d1db48b437c393d3d7c17be8d076c0f70f67?s=16&d=retro) |
0911f37 |
+
|
|
![](https://seccdn.libravatar.org/avatar/fec05c4ec364a789aeda37b99c85d1db48b437c393d3d7c17be8d076c0f70f67?s=16&d=retro) |
0911f37 |
+! This program is free software; you can redistribute it and/or modify
|
|
![](https://seccdn.libravatar.org/avatar/fec05c4ec364a789aeda37b99c85d1db48b437c393d3d7c17be8d076c0f70f67?s=16&d=retro) |
0911f37 |
+! it under the terms of the GNU General Public License as published by
|
|
![](https://seccdn.libravatar.org/avatar/fec05c4ec364a789aeda37b99c85d1db48b437c393d3d7c17be8d076c0f70f67?s=16&d=retro) |
0911f37 |
+! the Free Software Foundation; either version 3 of the License, or
|
|
![](https://seccdn.libravatar.org/avatar/fec05c4ec364a789aeda37b99c85d1db48b437c393d3d7c17be8d076c0f70f67?s=16&d=retro) |
0911f37 |
+! (at your option) any later version.
|
|
![](https://seccdn.libravatar.org/avatar/fec05c4ec364a789aeda37b99c85d1db48b437c393d3d7c17be8d076c0f70f67?s=16&d=retro) |
0911f37 |
+!
|
|
![](https://seccdn.libravatar.org/avatar/fec05c4ec364a789aeda37b99c85d1db48b437c393d3d7c17be8d076c0f70f67?s=16&d=retro) |
0911f37 |
+! This program is distributed in the hope that it will be useful,
|
|
![](https://seccdn.libravatar.org/avatar/fec05c4ec364a789aeda37b99c85d1db48b437c393d3d7c17be8d076c0f70f67?s=16&d=retro) |
0911f37 |
+! but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
![](https://seccdn.libravatar.org/avatar/fec05c4ec364a789aeda37b99c85d1db48b437c393d3d7c17be8d076c0f70f67?s=16&d=retro) |
0911f37 |
+! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
![](https://seccdn.libravatar.org/avatar/fec05c4ec364a789aeda37b99c85d1db48b437c393d3d7c17be8d076c0f70f67?s=16&d=retro) |
0911f37 |
+! GNU General Public License for more details.
|
|
![](https://seccdn.libravatar.org/avatar/fec05c4ec364a789aeda37b99c85d1db48b437c393d3d7c17be8d076c0f70f67?s=16&d=retro) |
0911f37 |
+!
|
|
![](https://seccdn.libravatar.org/avatar/fec05c4ec364a789aeda37b99c85d1db48b437c393d3d7c17be8d076c0f70f67?s=16&d=retro) |
0911f37 |
+! You should have received a copy of the GNU General Public License
|
|
![](https://seccdn.libravatar.org/avatar/fec05c4ec364a789aeda37b99c85d1db48b437c393d3d7c17be8d076c0f70f67?s=16&d=retro) |
0911f37 |
+! along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
![](https://seccdn.libravatar.org/avatar/fec05c4ec364a789aeda37b99c85d1db48b437c393d3d7c17be8d076c0f70f67?s=16&d=retro) |
0911f37 |
+
|
|
![](https://seccdn.libravatar.org/avatar/fec05c4ec364a789aeda37b99c85d1db48b437c393d3d7c17be8d076c0f70f67?s=16&d=retro) |
0911f37 |
+ use omp_lib
|
|
![](https://seccdn.libravatar.org/avatar/fec05c4ec364a789aeda37b99c85d1db48b437c393d3d7c17be8d076c0f70f67?s=16&d=retro) |
0911f37 |
+ integer nthreads, i, a(1000)
|
|
![](https://seccdn.libravatar.org/avatar/fec05c4ec364a789aeda37b99c85d1db48b437c393d3d7c17be8d076c0f70f67?s=16&d=retro) |
0911f37 |
+ nthreads = omp_get_num_threads()
|
|
![](https://seccdn.libravatar.org/avatar/fec05c4ec364a789aeda37b99c85d1db48b437c393d3d7c17be8d076c0f70f67?s=16&d=retro) |
0911f37 |
+ if (nthreads .gt. 1000) call abort
|
|
![](https://seccdn.libravatar.org/avatar/fec05c4ec364a789aeda37b99c85d1db48b437c393d3d7c17be8d076c0f70f67?s=16&d=retro) |
0911f37 |
+
|
|
![](https://seccdn.libravatar.org/avatar/fec05c4ec364a789aeda37b99c85d1db48b437c393d3d7c17be8d076c0f70f67?s=16&d=retro) |
0911f37 |
+ do i = 1, nthreads
|
|
![](https://seccdn.libravatar.org/avatar/fec05c4ec364a789aeda37b99c85d1db48b437c393d3d7c17be8d076c0f70f67?s=16&d=retro) |
0911f37 |
+ a(i) = 0
|
|
![](https://seccdn.libravatar.org/avatar/fec05c4ec364a789aeda37b99c85d1db48b437c393d3d7c17be8d076c0f70f67?s=16&d=retro) |
0911f37 |
+ end do
|
|
![](https://seccdn.libravatar.org/avatar/fec05c4ec364a789aeda37b99c85d1db48b437c393d3d7c17be8d076c0f70f67?s=16&d=retro) |
0911f37 |
+ print *, "start-here"
|
|
![](https://seccdn.libravatar.org/avatar/fec05c4ec364a789aeda37b99c85d1db48b437c393d3d7c17be8d076c0f70f67?s=16&d=retro) |
0911f37 |
+!$omp parallel
|
|
![](https://seccdn.libravatar.org/avatar/fec05c4ec364a789aeda37b99c85d1db48b437c393d3d7c17be8d076c0f70f67?s=16&d=retro) |
0911f37 |
+ a(omp_get_thread_num() + 1) = 1
|
|
![](https://seccdn.libravatar.org/avatar/fec05c4ec364a789aeda37b99c85d1db48b437c393d3d7c17be8d076c0f70f67?s=16&d=retro) |
0911f37 |
+!$omp end parallel
|
|
![](https://seccdn.libravatar.org/avatar/fec05c4ec364a789aeda37b99c85d1db48b437c393d3d7c17be8d076c0f70f67?s=16&d=retro) |
0911f37 |
+ do i = 1, nthreads
|
|
![](https://seccdn.libravatar.org/avatar/fec05c4ec364a789aeda37b99c85d1db48b437c393d3d7c17be8d076c0f70f67?s=16&d=retro) |
0911f37 |
+ if (a(i) .ne. 1) call abort
|
|
![](https://seccdn.libravatar.org/avatar/fec05c4ec364a789aeda37b99c85d1db48b437c393d3d7c17be8d076c0f70f67?s=16&d=retro) |
0911f37 |
+ end do
|
|
![](https://seccdn.libravatar.org/avatar/fec05c4ec364a789aeda37b99c85d1db48b437c393d3d7c17be8d076c0f70f67?s=16&d=retro) |
0911f37 |
+ print *, "success"
|
|
![](https://seccdn.libravatar.org/avatar/fec05c4ec364a789aeda37b99c85d1db48b437c393d3d7c17be8d076c0f70f67?s=16&d=retro) |
0911f37 |
+ end
|