- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
i am running a code where i am getting a strange problem i.e. program is getting stuck after a few loop. i am putting the log file!
$ ./irun
Concentration of Atom A = 0.600000000000000
Concentration of Atom B = 0.400000000000000
Running ASR loop 1
Reading ASMAP Complete
WORKING FOR SPIN UP
Reading POTENTIAL PARAMETERS from POTPAR_A
Reading POTENTIAL PARAMETERS from POTPAR_B
WORKING FOR ATOM 1
Reading STRUCTURE MATRIX complete
Starting orbital loop 7 Starting orbital loop 5 Starting orbital loop 1 Starting orbital loop 3............................done
done
done
done
WORKING FOR ATOM 2
Reading STRUCTURE MATRIX complete
Starting orbital loop 7 Starting orbital loop 5 Starting orbital loop 1 Starting orbital loop 3..........................done
done
..done
done
WORKING FOR SPIN DW
Reading POTENTIAL PARAMETERS from POTPAR_A
Reading POTENTIAL PARAMETERS from POTPAR_B
WORKING FOR ATOM 1
Reading STRUCTURE MATRIX complete
Starting orbital loop 3 Starting orbital loop 7 Starting orbital loop 5 Starting orbital loop 1..........................done
done
..done
done
WORKING FOR ATOM 2
Reading STRUCTURE MATRIX complete
Starting orbital loop 7 Starting orbital loop 3 Starting orbital loop 1 Starting orbital loop 5............................done
done
done
done
Running ASR loop 2
Reading ASMAP Complete
WORKING FOR SPIN UP
Reading POTENTIAL PARAMETERS from POTPAR_A
Reading POTENTIAL PARAMETERS from POTPAR_B
WORKING FOR ATOM 1
Reading STRUCTURE MATRIX complete
Starting orbital loop 3 Starting orbital loop 7 Starting orbital loop 5 Starting orbital loop 1..........................done
..done
done
done
WORKING FOR ATOM 2
Reading STRUCTURE MATRIX complete
Starting orbital loop 1 Starting orbital loop 7 Starting orbital loop 5 Starting orbital loop 3..........................done
..done
done
done
WORKING FOR SPIN DW
Reading POTENTIAL PARAMETERS from POTPAR_A
Reading POTENTIAL PARAMETERS from POTPAR_B
WORKING FOR ATOM 1
Reading STRUCTURE MATRIX complete
Starting orbital loop 7 Starting orbital loop 5 Starting orbital loop 3 Starting orbital loop 1............................done
done
done
done
WORKING FOR ATOM 2
Reading STRUCTURE MATRIX complete
Starting orbital loop 3 Starting orbital loop 7 Starting orbital loop 5 Starting orbital loop 1............................
Since the result is from a do loop, i dont feel there is any apperent reason why program should stuck. Can you people suggest some reason/ compilation option so that i can check the memory use etc?
that will be a great help for me
$ ./irun
Concentration of Atom A = 0.600000000000000
Concentration of Atom B = 0.400000000000000
Running ASR loop 1
Reading ASMAP Complete
WORKING FOR SPIN UP
Reading POTENTIAL PARAMETERS from POTPAR_A
Reading POTENTIAL PARAMETERS from POTPAR_B
WORKING FOR ATOM 1
Reading STRUCTURE MATRIX complete
Starting orbital loop 7 Starting orbital loop 5 Starting orbital loop 1 Starting orbital loop 3............................done
done
done
done
WORKING FOR ATOM 2
Reading STRUCTURE MATRIX complete
Starting orbital loop 7 Starting orbital loop 5 Starting orbital loop 1 Starting orbital loop 3..........................done
done
..done
done
WORKING FOR SPIN DW
Reading POTENTIAL PARAMETERS from POTPAR_A
Reading POTENTIAL PARAMETERS from POTPAR_B
WORKING FOR ATOM 1
Reading STRUCTURE MATRIX complete
Starting orbital loop 3 Starting orbital loop 7 Starting orbital loop 5 Starting orbital loop 1..........................done
done
..done
done
WORKING FOR ATOM 2
Reading STRUCTURE MATRIX complete
Starting orbital loop 7 Starting orbital loop 3 Starting orbital loop 1 Starting orbital loop 5............................done
done
done
done
Running ASR loop 2
Reading ASMAP Complete
WORKING FOR SPIN UP
Reading POTENTIAL PARAMETERS from POTPAR_A
Reading POTENTIAL PARAMETERS from POTPAR_B
WORKING FOR ATOM 1
Reading STRUCTURE MATRIX complete
Starting orbital loop 3 Starting orbital loop 7 Starting orbital loop 5 Starting orbital loop 1..........................done
..done
done
done
WORKING FOR ATOM 2
Reading STRUCTURE MATRIX complete
Starting orbital loop 1 Starting orbital loop 7 Starting orbital loop 5 Starting orbital loop 3..........................done
..done
done
done
WORKING FOR SPIN DW
Reading POTENTIAL PARAMETERS from POTPAR_A
Reading POTENTIAL PARAMETERS from POTPAR_B
WORKING FOR ATOM 1
Reading STRUCTURE MATRIX complete
Starting orbital loop 7 Starting orbital loop 5 Starting orbital loop 3 Starting orbital loop 1............................done
done
done
done
WORKING FOR ATOM 2
Reading STRUCTURE MATRIX complete
Starting orbital loop 3 Starting orbital loop 7 Starting orbital loop 5 Starting orbital loop 1............................
Since the result is from a do loop, i dont feel there is any apperent reason why program should stuck. Can you people suggest some reason/ compilation option so that i can check the memory use etc?
that will be a great help for me
Link kopiert
5 Antworten
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
for checking memory you can always use top, htop or ps...
can you edit the source? maybe you could monitor the variables (especially the ones that should get you out of the loop). another chance is to run the code in a debugger, for instance ddd can use the intel debugger. do you have access to the code source? is this a mac or a linux machine?
best regards,
can you edit the source? maybe you could monitor the variables (especially the ones that should get you out of the loop). another chance is to run the code in a debugger, for instance ddd can use the intel debugger. do you have access to the code source? is this a mac or a linux machine?
best regards,
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
yes....its written by me (hence i have the source)....the problem is its not showing any error
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
Quoting - roddur
yes....its written by me (hence i have the source)....the problem is its not showing any error
another thing you can do is to run it under valgrind to check for memory leaks or something of the kind. when you say "stuck" you mean the program freezes?
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
Quoting - rreis
another thing you can do is to run it under valgrind to check for memory leaks or something of the kind. when you say "stuck" you mean the program freezes?
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
roddur,
Most debuggers have a "Break into program now" button. On Windows Visual Studio Debugger the button looks like a pause button ||
The debugger you use on Linux/Mac will likely have a similar button. Once you break into the program you can context switch between threads and see where each is sitting.
What you are describing is called a deadlock. A waiting for B, B waiting for C, C waiting for A. Or even something as obvious as A waiting for A (obvious once you see the fault in your code).
Another thing you can do is run a profiler. Run it into the deadlock condition and let it burn for 10-20 seconds and then stop. The profiler will show you where the high activity was taking place.
Jim Dempsey
Antworten
Themen-Optionen
- RSS-Feed abonnieren
- Thema als neu kennzeichnen
- Thema als gelesen kennzeichnen
- Diesen Thema für aktuellen Benutzer floaten
- Lesezeichen
- Abonnieren
- Drucker-Anzeigeseite