Openmp call subroutine in parallel region and omp do - fortran

I try to call a subroutine which contains a omp do in the main program parallel region omp do.
The fake code like
program main
double precision, dimension(0:8,0:8):: a,b,c,temp,final
integer:: i,j,k
integer:: nx=10
integer:: ny=10
a=reshape((/ 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , &
-4 , -1 , -1 , -1 , -1 , 2 , 2 , 2 , 2 , &
4 , -2 , -2 , -2 , -2 , 1 , 1 , 1 , 1 , &
0 , 1 , 0 , -1 , 0 , 1 , -1 , -1 , 1 , &
0 , -2 , 0 , 2 , 0 , 1 , -1 , -1 , 1 , &
0 , 0 , 1 , 0 , -1 , 1 , 1 , -1 , -1 , &
0 , 0 , -2 , 0 , 2 , 1 , 1 , -1 , -1 , &
0 , 1 , -1 , 1 , -1 , 0 , 0 , 0 , 0 , &
0 , 0 , 0 , 0 , 0 , 1 , -1 , 1 , -1 /),shape(a))
b=1.d0/36.d0 * reshape ((/ 4 , -4 , 4 , 0 , 0 , 0 , 0 , 0 , 0 , &
4 , -1 , -2 , 6 , -6 , 0 , 0 , 9 , 0 , &
4 , -1 , -2 , 0 , 0 , 6 , -6 , -9 , 0 , &
4 , -1 , -2 , -6 , 6 , 0 , 0 , 9 , 0 , &
4 , -1 , -2 , 0 , 0 , -6 , 6 , -9 , 0 , &
4 , 2 , 1 , 6 , 3 , 6 , 3 , 0 , 9 , &
4 , 2 , 1 , -6 , -3 , 6 , 3 , 0 , -9 , &
4 , 2 , 1 , -6 , -3 , -6 , -3 , 0 , 9 , &
4 , 2 , 1 , 6 , 3 , -6 , -3 , 0 , -9 /),shape(b))
c=reshape((/ 1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , &
0 , 1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , &
0 , 0 , 1 , 0 , 0 , 0 , 0 , 0 , 0 , &
0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 0 , &
0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , &
0 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , &
0 , 0 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , &
0 , 0 , 0 , 0 , 0 , 0 , 0 , 1 , 0 , &
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 1 /),shape(c))
!$omp parallel
!$omp do
do j=0,ny
do i=0,nx
c(6,6)=i
c(7,7)=i
call muti(a,b,temp)
call muti(temp,c,final)
enddo
enddo
!$omp enddo
!$omp end parallel
end program
subroutine muti(m1,m2,m3)
double precision,dimension(0:8,0:8)::m1,m2,m3,tmp
integer::i,j,k
!$omp do
do j=0,8
do i=0,8
tmp(i,j)=0.d0
do k=0,8
tmp(i,j)=tmp(i,j)+m1(k,j)*m2(i,k)
enddo
m3(i,j)=tmp(i,j)
enddo
enddo
!$omp enddo
endsubroutine
The subroutine calculates matrix multiplication, however I cannot get right result. My problem is not something about how to coding this program, I am confused about how to write the code like this which I need to call the subroutine in another parallel. I read some problems relative to this, still confused. Thanks!
I write the code, the main idea for this is that calculate three matrix multiplication for every (i,j) points. The code behavior very slow, and result is not correct.

Related

Split json like string with C++20 ranges/views

I have the following string:
std::string ob = R"({ "U" : 972448093270,"u" : 972448098626,"pu" : 972448093117,"b" : [["54019.38","0.414"],["54016.91","0.002"],["54016.80","0.180"],["54016.51","0.001"],["54012.74","0.001"],["54012.38","0.001"],["54011.65","0.044"],["54011.57","0.005"],["54011.40","0.001"],["54011.27","0.200"],["54011.26","0.200"],["54011.25","0.784"],["54011.12","0.200"],["54011.11","0.312"],["54011.04","1.920"],["54010.67","0.123"],["54010.39","0.025"],["54008.59","0.074"],["54008.58","0.167"],["54008.06","0.010"]]})";
Starting from "b" I want all the numbers split and joined in a vector, so effectively I want my vector to look like this:
54019.38 0.414 54016.91 etc
I have implemented the followint with C++20 ranges/views
#include <iostream>
#include <vector>
#include <ranges>
auto to_vector(auto&& rng)
{
std::vector<std::ranges::range_value_t<decltype(rng)>> v;
if constexpr (std::ranges::sized_range<decltype(rng)>) {
v.reserve(std::ranges::size(rng));
}
std::ranges::copy(rng, std::back_inserter(v));
return v;
}
int main()
{
std::string ob = R"({ "U" : 972448093270,"u" : 972448098626,"pu" : 972448093117,"b" : [["54019.38","0.414"],["54016.91","0.002"],["54016.80","0.180"],["54016.51","0.001"],["54012.74","0.001"],["54012.38","0.001"],["54011.65","0.044"],["54011.57","0.005"],["54011.40","0.001"],["54011.27","0.200"],["54011.26","0.200"],["54011.25","0.784"],["54011.12","0.200"],["54011.11","0.312"],["54011.04","1.920"],["54010.67","0.123"],["54010.39","0.025"],["54008.59","0.074"],["54008.58","0.167"],["54008.06","0.010"]]})";
auto digits = ob | std::views::drop_while([](auto i) {return i != 'b'; }) | std::views::split('"') | std::views::join;
auto vec = to_vector(digits);
for (auto const& item : vec) {
std::cout << item <<" ";
}
}
Unfortunately instead of expected output I got
`b : [ [ 5 4 0 1 9 . 3 8 , 0 . 4 1 4 ] , [ 5 4 0 1 6 . 9 1 , 0 . 0 0 2 ] , [ 5 4 0 1 6 . 8 0 , 0 . 1 8 0 ] , [ 5 4 0 1 6 . 5 1 , 0 . 0 0 1 ] , [ 5 4 0 1 2 . 7 4 , 0 . 0 0 1 ] , [ 5 4 0 1 2 . 3 8 , 0 . 0 0 1 ] , [ 5 4 0 1 1 . 6 5 , 0 . 0 4 4 ] ...etc
So I have each character in a vector individually instead of splitting whatever was between "'s
Can someone please help me fix this, thanks in advance.

How to grep this line "12/15-12:24:51 <1692> ## 0 0 0 0 0 0 0 0 0 0 691 0"

I've a file called test.txt
12/15-12:24:51 <1692> ## 0 0 0 0 0 0 0 0 0 0 691 0
12/15-12:24:51 <1692> END SESSION SUMMARY
12/15-12:24:55 <1692> INFO: SESSION SUMMARY
12/15-12:24:55 <1692> + - ch G B C L S T X Y -
12/15-12:24:55 <1692> ## 0 0 0 0 0 0 0 0 0 0 692 0
12/15-12:24:55 <1692> END SESSION SUMMARY
12/15-12:24:59 <1692> INFO: SESSION SUMMARY
12/15-12:24:59 <1692> + - ch G B C L S T X Y -
12/15-12:24:59 <1692> ## 0 0 0 0 0 0 0 0 0 0 692 0
12/15-12:24:59 <1692> END SESSION SUMMARY
12/15-12:25:03 <1692> INFO: SESSION SUMMARY
12/15-12:25:03 <1692> + - ch G B C L S T X Y -
12/15-12:25:03 <1692> ## 0 0 0 0 0 0 0 0 0 0 692 0
12/15-12:25:03 <1692> END SESSION SUMMARY
12/15-12:25:07 <1692> INFO: SESSION SUMMARY
12/15-12:25:07 <1692> + - ch G B C L S T X Y -
12/15-12:25:07 <1692> ## 0 0 0 0 0 0 0 0 0 0 692 0
12/15-12:25:07 <1692> END SESSION SUMMARY
and need output as
12/15-12:24:51 <1692> ## 0 0 0 0 0 0 0 0 0 0 691 0
12/15-12:24:55 <1692> ## 0 0 0 0 0 0 0 0 0 0 692 0
12/15-12:24:59 <1692> ## 0 0 0 0 0 0 0 0 0 0 692 0
12/15-12:25:03 <1692> ## 0 0 0 0 0 0 0 0 0 0 692 0
12/15-12:25:07 <1692> ## 0 0 0 0 0 0 0 0 0 0 692 0
Tried following way but couldn't get
cat test.txt | perl -e '$str = do { local $/; <> }; while ($str =~ /(\d\d):(\d\d):(\d\d)?\s.*/) { print "$1:$2:$3:$4\n"}'
Your one-liner has some mistakes. I will go through them, then show you a solution.
cat test.txt |
You don't need to cat into a pipe, just use the file name as argument when using diamond operator <>.
perl -e '$str = do { local $/; <> };
This slurps the entire file into a single string. This is not useful in your case. This is only useful if you are expecting matches that include newlines.
while ($str =~ /(\d\d):(\d\d):(\d\d)?\s.*/) {
This part will only run once, because you did not use the /g modifier. This is especially bad since you are not running in line-by-line mode, because you slurped the file.
The regex will try to match one of the time stamps, I assume, e.g. 12:25:07. Why you would want to do that is beyond me, since each line in your input has such a time stamp, rendering the whole operation useless. You want to try to match something that is unique for the lines you do want.
print "$1:$2:$3:$4\n"}'
This part prints 4 capture groups, and you only have 3 (2 fixed and 1 optional). It will not print the entire line.
What you want is something simplistic like this:
perl -ne'print if /\#\#/' test.txt
Which will go through the file line-by-line, check each line for ## and print the lines found.
Or if you are using *nix, just grep '##' test.txt

Convert this Word DataFrame into Zero One Matrix Format DataFrame in Python Pandas

Want to convert user_Id and skills dataFrame matrix into zero one DataFrame matrix format user and their corresponding skills
Input DataFrame
user_Id skills
0 user1 [java, hdfs, hadoop]
1 user2 [python, c++, c]
2 user3 [hadoop, java, hdfs]
3 user4 [html, java, php]
4 user5 [hadoop, php, hdfs]
Desired Output DataFrame
user_Id java c c++ hadoop hdfs python html php
user1 1 0 0 1 1 0 0 0
user2 0 1 1 0 0 1 0 0
user3 1 0 0 1 1 0 0 0
user4 1 0 0 0 0 0 1 1
user5 0 0 0 1 1 0 0 1
You can join new DataFrame created by astype if need convert lists to str (else omit), then remove [] by strip and use get_dummies:
df = df[['user_Id']].join(df['skills'].astype(str).str.strip('[]').str.get_dummies(', '))
print (df)
user_Id c c++ hadoop hdfs html java php python
0 user1 0 0 1 1 0 1 0 0
1 user2 1 1 0 0 0 0 0 1
2 user3 0 0 1 1 0 1 0 0
3 user4 0 0 0 0 1 1 1 0
4 user5 0 0 1 1 0 0 1 0
df1 = df['skills'].astype(str).str.strip('[]').str.get_dummies(', ')
#if necessary remove ' from columns names
df1.columns = df1.columns.str.strip("'")
df = pd.concat([df['user_Id'], df1], axis=1)
print (df)
user_Id c c++ hadoop hdfs html java php python
0 user1 0 0 1 1 0 1 0 0
1 user2 1 1 0 0 0 0 0 1
2 user3 0 0 1 1 0 1 0 0
3 user4 0 0 0 0 1 1 1 0
4 user5 0 0 1 1 0 0 1 0

printing the number of times a element occurs in a file using regex

I have a long data similar to below
16:24:59 0 0 0
16:24:59 0 1 0
16:25:00 0 1 0
16:25:00 0 1 0
16:25:00 0 2 0
16:25:00 0 2 0
16:25:00 1 0 1
16:25:01 0 0 0
16:25:01 0 0 0
16:25:01 0 0 0
16:25:01 0 0 0
16:25:01 4 9 4
16:25:02 0 0 0
16:25:02 0 0 0
16:25:02 0 0 0
16:25:02 0 1 0
16:25:02 1 9 1
16:25:02 2 0 2
I wish to have a output where it prints the element in column 1, and the number of times it occurs. Below is what I expect. How can I do this?
16:24:59 2
16:25:00 5
16:25:01 5
16:25:02 6
How can I replace the above to
t1 2
t2 5
t3 5
t4 6
.
.
tn 9
It's pretty straight forward using awk
awk '{count[$1]++} END{ for ( i in count) print i, count[i]}'
Test
$ awk '{count[$1]++} END{ for ( i in count) print i, count[i]}' input
16:24:59 2
16:25:00 5
16:25:01 5
16:25:02 6
What it does?
count[$1]++ creates an associative array indexed by the first field.
END Action performed at the end of input file.
for ( i in count) print i, count[i] Iterate through the array count and print the values
Just in case you want a grep and uniq solution:
$ grep -Eo '^\s*\d\d:\d\d:\d\d' /tmp/lines.txt | uniq -c
2 16:24:59
5 16:25:00
5 16:25:01
6 16:25:02
Or, if tab delimited, use cut:
$ cut -f 2 /tmp/lines.txt | uniq -c
2 16:24:59
5 16:25:00
5 16:25:01
6 16:25:02

using get() and appending those chars to a string is giving me nonsense

I am supposed to use a program that (one char at a time) reads a GPS log file, and parses it. I'm getting normal responses when I use some .log files, and not with others (especially not long ones).
The code that grabs the information and stores it is below:
class ReadInput{
public:
string massiveString;
};
void ReadInput::assign(string inMassiveString){ //assign the string passed to it to the object
this->massiveString.empty(); //clear whatever might be in the string
this->massiveString=inMassiveString; //copy the string into where it belongs.
}
int main(int argc, const char * argv[]) {
ifstream inputStream;
inputStream.open("gps3.log");
int i = 1;
char temp;
string tempString;
ReadInput *sentence[258];
//this is the part that grabs the characters
while(1){ //
if (!inputStream.eof()){ //
inputStream.get(temp);
if (temp!=' ') {
tempString.append(&temp); //this appends the characters to a temporary string
// cout << i << "\t" << tempString << endl; //testing the input
}
if (temp == '\n') { //if this is the end of the line, pass it on.
sentence[i]=new ReadInput;
sentence[i]->assign(tempString); //the part that copies the temporary string to the object
cout << i << "\t" << sentence[i]->massiveString << endl; //another testing line
i++;
tempString.clear();
}
}
else{
break;
}
}
}
it is very important that I read it character by character.
what it should be reading looks like this:
$GPGGA,155008.000,3732.7239,N,07726.9956,W,1,05,1.7,89.0,M,-33.6,M,,0000*53
and here is an example of a problematic reading. in the format of
entry#, stringStoredInEntry.
1 $GPGGA,155002.000,3732.7239,N,07726.9956,W,1,05,1.7,89.1,M,-33.6,M,,0000*58
2 $GPGSA,A,3,17,06,28,02,24,,,,,,,,3.2,1.7,2.7*3E
3 $GPRMC,155002.000,A,3732.7239,N,07726.9956,W,0.00,80.30,141014,,,A*48
4 $GPGGA,155003.000,3732.7239,N,07726.9956,W,1,05,1.7,89.1,M,-33.6,M,,0000*59
5 $GPGSA,A,3,17,06,28,02,24,,,,,,,,3.2,1.7,2.7*3E
6 $GPGSV,3,1,12,17,64,038,42,06,63,250,43,28,44,150,45,02,25,239,38*7B
7 $GPGSV,3,2,12,24,17,294,22,10,21,176,22,12,25,316,23,51,36,223,37*71
8 F
9 $ G P R M C , 1 5 5 0 0 3 . 0 0 0 , A , 3 79
10 $
G
P
G
G
A
,
1
5
5
0
0
4
.
0
0
0
,
3
7
3
2
.
7
2
3
9
,
N
,
0
7
7
2
6
.
9
9
5
6
,
W
,
1
,
0
5
,
1
.
7
,
8
9
.
1
,
M
,
-
3
3
.
6
,
M
,
,
0
0
0
0
*
5
E
11 $
G
P
G
S
A
,
A
,
3
,
1
7
,
0
6
,
2
8
,
0
2
,
2
4
,
,
,
,
,
,
,
,
3
.
2
,
1
.
7
,
2
.
7
*
3
E
12 $
G
P
R
M
C
,
1
5
5
0
0
4
.
0
0
0
,
A
,
3
7
3
2
.
7
2
3
9
,
N
,
0
7
7
2
6
.
9
8 $GPGGA,155009.000,3732.7239,N,07726.9956,W,1,05,1.7,89.0,M,-33.6,M,,0000*52
29 $GPGSA,A,3,17,06,28,02,24,,,,,,,,3.2,1.7,2.7*3E
30 $GPRMC,155009.000,A,3732.7239,N,07726.9956,W,0.00,80.30,141014,,,A*43
31 $GPGGA,155010.000,3732.7239,N,07726.9956,W,1,05,1.7,89.0,M,-33.6,M,,0000*5A
2 $ G P G S A , A , 3 , 1 7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,(1(,(0(5(,(1(.(7(,(8(9(.(0(,(M(,(-(3(3(.(6(,(M(,(,(0(0(0(0(*(5(9(
)41 $)G)P)G)S)A),)A),)3),)1)7),)0)6),)2)8),)0)2),)2)4),),),),),),),),)3).)2),)1).)7),)2).)7)*)3)E)
*42 $*G*P*G*S*V*,*3*,*1*,*1*2*,*1*7*,*6*4*,*0*3*8*,*4*1*,*0*6*,*6*3*,*2*5*0*,*4*2*,*2*8*,*4*4*,*1*5*0*,*4*3*,*0*2*,*2*5*,*2*3*9*,*3*8***7*F*
+43 $+G+P+G+S+V+,+3+,+2+,+1+2+,+2+4+,+1+7+,+2+9+4+,+2+3+,+1+0+,+2+1+,+1+7+6+,+2+2+,+1+2+,+2+5+,+3+1+6+,+2+4+,+5+1+,+3+6+,+2+2+3+,+3+5+*+7+5+
,44 $,G,P,G,S,V,,,3,,,3,,,1,2,,,2,0,,,3,4,,,0,6,2,,,,,0,1,,,0,7,,,0,5,1,,,,,0,4,,,0,6,,,0,5,2,,,,,3,2,,,0,2,,,0,3,3,,,*,7,F,
-45 $-G-P-R-M-C-,-1-5-5-0-1-3-.-0-0-0-,-A-,-3-7-3-2-.-7-2-3-9-,-N-,-0-7-7-2-6-.-9-9-5-6-,-W-,-0-.-0-0-,-8-0-.-3-0-,-1-4-1-0-1-4-,-,-,-A-*-4-8-
.46 $.G.P.G.G.A.,.1.5.5.0.1.4...0.0.0.,.3.7.3.2...7.2.3.9.,.N.,.0.7.7.2.6...9.9.5.6.,.W.,.1.,.0.5.,.1...7.,.8.9...0.,.M.,.-.3.3...6.,.M.,.,.0.0.0.0.*.5.E.
/47 $/G/P/G/S/A/,/A/,/3/,/1/7/,/0/6/,/2/8/,/0/2/,/2/4/,/,/,/,/,/,/,/,/3/./2/,/1/./7/,/2/./7/*/3/E/
048 $0G0P0R0M0C0,0105050001040.0000000,0A0,030703020.070203090,0N0,00070702060.090905060,0W0,000.00000,08000.03000,0104010001040,0,0,0A0*040F0
149 $1G1P1G1G1A1,1115151011151.1010101,131713121.171213191,1N1,10171712161.191915161,1W1,111,10151,111.171,18191.101,1M1,1-13131.161,1M1,1,101010101*151F1
250 $2G2P2G2S2A2,2A2,232,21272,20262,22282,20222,22242,2,2,2,2,2,2,2,232.222,212.272,222.272*232E2
351 $3G3P3R3M3C3,3135353031353.3030303,3A3,333733323.373233393,3N3,30373732363.393935363,3W3,303.30303,38303.33303,3134313031343,3,3,3A3*343E3
452 $4G4P4G4G4A4,4145454041464.4040404,434743424.474243494,4N4,40474742464.494945464,4W4,414,40454,414.474,48484.494,4M4,4-43434.464,4M4,4,404040404*45444
553 $5G5P5G5S5A5,5A5,535,51575,50565,52585,50525,52545,5,5,5,5,5,5,5,535.525,515.575,525.575*535E5
654 $6G6P6R6M6C6,6165656061666.6060606,6A6,636763626.676263696,6N6,60676762666.696965666,6W6,606.60606,68606.63606,6164616061646,6,6,6A6*646D6
755 $7G7P7G7G7A7,7175757071777.7070707,737773727.777273797,7N7,70777772767.797975767,7W7,717,70757,717.777,78787.797,7M7,7-73737.767,7M7,7,707070707*75757
856 $8G8P8G8S8A8,8A8,838,81878,80868,82888,80828,82848,8,8,8,8,8,8,8,838.828,818.878,828.878*838E8
957 $9G9P9R9M9C9,9195959091979.9090909,9A9,939793929.979293999,9N9,90979792969.999995969,9W9,909.90909,98909.93909,9194919091949,9,9,9A9*949C9
:58 $:G:P:G:G:A:,:1:5:5:0:1:8:.:0:0:0:,:3:7:3:2:.:7:2:3:9:,:N:,:0:7:7:2:6:.:9:9:5:6:,:W:,:1:,:0:5:,:1:.:7:,:8:8:.:9:,:M:,:-:3:3:.:6:,:M:,:,:0:0:0:0:*:5:A:
;59 $;G;P;G;S;A;,;A;,;3;,;1;7;,;0;6;,;2;8;,;0;2;,;2;4;,;,;,;,;,;,;,;,;3;.;2;,;1;.;7;,;2;.;7;*;3;E;
<60 $<G<P<G<S<V<,<3<,<1<,<1<2<,<1<7<,<6<4<,<0<3<9<,<4<2<,<0<6<,<6<4<,<2<5<0<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4D
22 $GPGSA,A,3,17,06,28,02,24,,,,,,,,3.2,1.7,2.7*3E,1.7,89.0,M,-33.6,M,,0000*53
23 $GPGSA,A,3,17,06,28,02,24,,,,,,,,3.2,1.7,2.7*3E
34 $GPRMC,155002.000,A,3732.7239,N,07726.9956,W,0.00,80.30,141014,,,A*48
25 $GPGSV,3,2,12,24,17,294,22,10,21,176,22,12,25,316,24,51,36,223,35*74
46 $GPGGA,155003.000,3732.7239,N,07726.9956,W,1,05,1.7,89.1,M,-33.6,M,,0000*59
27 $
5 $GPGSA,A,3,17,06,28,02,24,,,,,,,,3.2,1.7,2.7*3E
6 $GPGSV,3,1,12,17,64,038,42,06,63,250,43,28,44,150,45,02,25,239,38*7B
7 $GPGSV,3,2,12,24,17,294,22,10,21,176,22,12,25,316,23,51,36,223,37*71
8 F
9 $ G P R M C , 1 5 5 0 0 3 . 0 0 0 , A , 3 79
10 $
G
P
G
G
A
,
1
5
5
0
0
4
.
0
0
0
,
3
7
3
2
.
7
2
3
9
,
N
,
0
7
7
2
6
.
9
9
5
6
,
W
,
1
,
0
5
,
1
.
7
,
8
9
.
1
,
M
,
-
3
3
.
6
,
M
,
,
0
0
0
0
*
5
E
11 $
G
P
G
S
A
,
A
,
3
,
1
7
,
0
6
,
2
8
,
0
2
,
2
4
,
,
,
,
,
,
,
,
3
.
2
,
1
.
7
,
2
.
7
*
3
E
12 $
G
P
R
M
C
,
1
5
5
0
0
4
.
0
0
0
,
A
,
3
7
3
2
.
7
2
3
9
,
N
,
0
7
7
2
6
.
9
9
5
6
,
W
,
0
.
0
0
,
8
0
.
3
0
8 $GPGGA,155009.000,3732.7239,N,07726.9956,W,1,05,1.7,89.0,M,-33.6,M,,0000*52
1
29 $GPGSA,A,3,17,06,28,02,24,,,,,,,,3.2,1.7,2.7*3E 4
1
30 $GPRMC,155009.000,A,3732.7239,N,07726.9956,W,0.00,80.30,141014,,,A*43
1
31 $GPGGA,155010.000,3732.7239,N,07726.9956,W,1,05,1.7,89.0,M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0,030703020.070203090,0N0,00070702060.090905060,0W0,000.00000,08000.03000,0104010001040,0,0,0A0*040F0
0
19 $1G1P1G1G1A1,1115151011151.1010101,131713121.171213191,1N1,10171712161.191915161,1W1,111,10151,111.171,18191.101,1M1,1-13131.161,1M1,1,101010101*151F1
1
20 $2G2P2G2S2A2,2A2,232,21272,20262,22282,20222,22242,2,2,2,2,2,2,2,232.222,212.272,222.272*232E2
2
31 $3G3P3R3M3C3,3135353031353.3030303,3A3,333733323.373233393,3N3,30373732363.393935363,3W3,303.30303,38303.33303,3134313031343,3,3,3A3*343E3
3
42 $4G4P4G4G4A4,4145454041464.4040404,434743424.474243494,4N4,40474742464.494945464,4W4,414,40454,414.474,48484.494,4M4,4-43434.464,4M4,4,404040404*45444
4
53 $5G5P5G5S5A5,5A5,535,51575,50565,52585,50525,52545,5,5,5,5,5,5,5,535.525,515.575,525.575*535E5
5
64 $6G6P6R6M6C6,6165656061666.6060606,6A6,636763626.676263696,6N6,60676762666.696965666,6W6,606.60606,68606.63606,6164616061646,6,6,6A6*646D6
6
75 $7G7P7G7G7A7,7175757071777.7070707,737773727.777273797,7N7,70777772767.797975767,7W7,717,70757,717.777,78787.797,7M7,7-73737.767,7M7,7,707070707*75757
7
86 $8G8P8G8S8A8,8A8,838,81878,80868,82888,80828,82848,8,8,8,8,8,8,8,838.828,818.878,828.878*838E8
8
97 $9G9P9R9M9C9,9195959091979.9090909,9A9,939793929.979293999,9N9,90979792969.999995969,9W9,909.90909,98909.93909,9194919091949,9,9,9A9*949C9
9
:8 $:G:P:G:G:A:,:1:5:5:0:1:8:.:0:0:0:,:3:7:3:2:.:7:2:3:9:,:N:,:0:7:7:2:6:.:9:9:5:6:,:W:,:1:,:0:5:,:1:.:7:,:8:8:.:9:,:M:,:-:3:3:.:6:,:M:,:,:0:0:0:0:*:5:A:
:
;9 $;G;P;G;S;A;,;A;,;3;,;1;7;,;0;6;,;2;8;,;0;2;,;2;4;,;,;,;,;,;,;,;,;3;.;2;,;1;.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is this nonsense creeping in? and, more importantly, how is it messing with the integers to the left? How can anything consistently make an integer that nonsensical?
using tempString.push_back(temp);
instead of tempString.append(&temp);
fixed everything.