Intel® Moderncode for Parallel Architectures
Support for developing parallel programming applications on Intel® Architecture.

formatting the output

roddur
Beginner
605 Views
At last i managed to run my code parallaly. Now i am looking for decorating the output.
the code looks like:
orbital: do il=1,lorbit-2,2
xa=0.0;ya=0.0
write(*,'(1x,"Starting orbital loop",1x,i1,$)') il
.
.
.
end do orbital

hence the output in serial run is
Starting orbital loop 1.......done
Starting orbital loop 3.......done
Starting orbital loop 5.......done
Starting orbital loop 7.......done
.etc but for parallel run it is obviously
Starting orbital loop 7 Starting orbital loop 3 Starting orbital loop 5 Starting orbital loop 1.........................done
.done
.done
.done
can anyone suggest me a better format?
0 Kudos
1 Solution
jimdempseyatthecove
Honored Contributor III
605 Views

Roddur,

Do you really need a text window progress bar for each thread? This will slow down your application.
One way to do this is to use critical section around the write statements (theStarting, the ..., and theDone)and use the orbital loop number as a line number. then using SETTEXTPOSITION and GETTEXTPOSITION keep track of where the output position is for each line.

This will slow down your processing time but if it is something you need then go ahead and add the code

Jim Dempsey

View solution in original post

0 Kudos
4 Replies
jimdempseyatthecove
Honored Contributor III
606 Views

Roddur,

Do you really need a text window progress bar for each thread? This will slow down your application.
One way to do this is to use critical section around the write statements (theStarting, the ..., and theDone)and use the orbital loop number as a line number. then using SETTEXTPOSITION and GETTEXTPOSITION keep track of where the output position is for each line.

This will slow down your processing time but if it is something you need then go ahead and add the code

Jim Dempsey
0 Kudos
jimdempseyatthecove
Honored Contributor III
605 Views

A second way might be place the write of "Starting orbital loops" outside the parallel section, then replace "." for eachloop with the loop number

Starting orbital loops 7345217... Done
0 Kudos
roddur
Beginner
605 Views
hmmm....my application is speed critical ....but still i would like to see how much it slows the applcation. its a new command to me and looks like its actually a C command.....i am trying and ll be back if i failed.
0 Kudos
jimdempseyatthecove
Honored Contributor III
605 Views

Just how long does it take to process each orbital loop? (single thread)

This reminds me...

I used to run a company that sold a backup program that performed virtual full backups. The program ran quite fast but still goodruntimes may have taken 1 to 2 minutes. The users complained about the lack of a progress bar. The problem was difficult for the users to understand as just about everything else was using progress bars. The situation was the time it would take to compute the estimated time to backup (for use in progress bar display) would take on order of the same time it would take to do the backup. When asked if they wanted to exchange a 1 to 2 minute backup without progress bar for a 2 to 4 minute backup with progress bar the preferred to dispense with the progress bar.

Jim
0 Kudos
Reply