ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/mdtools/interface_implementation/TraPPE_ExFF.cpp
(Generate patch)

Comparing trunk/mdtools/interface_implementation/TraPPE_ExFF.cpp (file contents):
Revision 141 by chuckv, Wed Oct 16 22:24:44 2002 UTC vs.
Revision 152 by mmeineke, Mon Oct 21 22:03:00 2002 UTC

# Line 11 | Line 11 | using namespace std;
11  
12   #ifdef IS_MPI
13  
14 + #include "mpiForceField.h"
15 +
16   int myNode;
17  
18   // Declare the structures that will be passed by MPI
# Line 28 | Line 30 | MPI_Datatype mpiAtomStructType;
30   } atomStruct;
31   MPI_Datatype mpiAtomStructType;
32  
33 + typedef struct{
34 +  char nameA[15];
35 +  char nameB[15];
36 +  char type[30];
37 +  double d0;
38 +  int last;      //  0  -> default
39 +                 //  1  -> tells nodes to stop listening
40 +                 // -1  -> an error has occured. (handled in mpiForceField)
41 + } bondStruct;
42 + MPI_Datatype mpiBondStructType;
43 +
44 + typedef struct{
45 +  char nameA[15];
46 +  char nameB[15];
47 +  char nameC[15];
48 +  char type[30];
49 +  double k1, k2, k3, t0;
50 +  int last;      //  0  -> default
51 +                 //  1  -> tells nodes to stop listening
52 +                 // -1  -> an error has occured. (handled in mpiForceField)
53 + } bendStruct;
54 + MPI_Datatype mpiBendStructType;
55 +
56 + typedef struct{
57 +  char nameA[15];
58 +  char nameB[15];
59 +  char nameC[15];
60 +  char nameD[15];
61 +  char type[30];
62 +  double k1, k2, k3, k4;
63 +  int last;      //  0  -> default
64 +                 //  1  -> tells nodes to stop listening
65 +                 // -1  -> an error has occured. (handled in mpiForceField)
66 + } TorsionStruct;
67 + MPI_Datatype mpiTorsionStructType;
68 +
69   #endif
70  
71  
# Line 38 | Line 76 | TraPPE_ExFF::TraPPE_ExFF(){
76    char* ffPath_env = "FORCE_PARAM_PATH";
77    char* ffPath;
78    char temp[200];
79 +  char errMsg[1000];
80  
81   #ifdef IS_MPI
82    int i;
83    int mpiError;
84 <
84 >  int cleanOpen = 0;
85 >  
86    mpiError = MPI_Comm_rank(MPI_COMM_WORLD,&myNode);
87 +  
88 +  // **********************************************************************
89 +  // Init the atomStruct mpi type
90  
91    atomStruct atomProto; // mpiPrototype
92    int atomBC[3] = {15,4,2};  // block counts
# Line 66 | Line 109 | TraPPE_ExFF::TraPPE_ExFF(){
109    MPI_Type_commit(&mpiAtomStructType);
110  
111  
112 +  // **********************************************************************
113 +  // Init the bondStruct mpi type
114 +  
115 +  bondStruct bondProto; // mpiPrototype
116 +  int bondBC[3] = {60,1,1};  // block counts
117 +  MPI_Aint bondDspls[3];           // displacements
118 +  MPI_Datatype bondMbrTypes[3];    // member mpi types
119 +  
120 +  MPI_Address(&bondProto.nameA, &bondDspls[0]);
121 +  MPI_Address(&bondProto.d0,    &bondDspls[1]);
122 +  MPI_Address(&bondProto.last,  &bondDspls[2]);
123 +  
124 +  bondMbrTypes[0] = MPI_CHAR;
125 +  bondMbrTypes[1] = MPI_DOUBLE;
126 +  bondMbrTypes[2] = MPI_INT;
127 +  
128 +  for (i=2; i >= 0; i--) bondDspls[i] -= bondDspls[0];
129 +  
130 +  MPI_Type_struct(3, bondBC, bondDspls, bondMbrTypes, &mpiBondStructType);
131 +  MPI_Type_commit(&mpiBondStructType);
132  
133  
134 +  // **********************************************************************
135 +  // Init the bendStruct mpi type
136 +  
137 +  bendStruct bendProto; // mpiPrototype
138 +  int bendBC[3] = {75,4,1};  // block counts
139 +  MPI_Aint bendDspls[3];           // displacements
140 +  MPI_Datatype bendMbrTypes[3];    // member mpi types
141 +  
142 +  MPI_Address(&bendProto.nameA, &bendDspls[0]);
143 +  MPI_Address(&bendProto.k1,    &bendDspls[1]);
144 +  MPI_Address(&bendProto.last,  &bendDspls[2]);
145 +  
146 +  bendMbrTypes[0] = MPI_CHAR;
147 +  bendMbrTypes[1] = MPI_DOUBLE;
148 +  bendMbrTypes[2] = MPI_INT;
149 +  
150 +  for (i=2; i >= 0; i--) bendDspls[i] -= bendDspls[0];
151 +  
152 +  MPI_Type_struct(3, bendBC, bendDspls, bendMbrTypes, &mpiBendStructType);
153 +  MPI_Type_commit(&mpiBendStructType);
154 +
155 +
156 +  // **********************************************************************
157 +  // Init the torsionStruct mpi type
158 +  
159 +  torsionStruct torsionProto; // mpiPrototype
160 +  int torsionBC[3] = {90,4,1};  // block counts
161 +  MPI_Aint torsionDspls[3];           // displacements
162 +  MPI_Datatype torsionMbrTypes[3];    // member mpi types
163 +  
164 +  MPI_Address(&torsionProto.nameA, &torsionDspls[0]);
165 +  MPI_Address(&torsionProto.k1,    &torsionDspls[1]);
166 +  MPI_Address(&torsionProto.last,  &torsionDspls[2]);
167 +  
168 +  torsionMbrTypes[0] = MPI_CHAR;
169 +  torsionMbrTypes[1] = MPI_DOUBLE;
170 +  torsionMbrTypes[2] = MPI_INT;
171 +  
172 +  for (i=2; i >= 0; i--) torsionDspls[i] -= torsionDspls[0];
173 +  
174 +  MPI_Type_struct(3, torsionBC, torsionDspls, torsionMbrTypes,
175 +                  &mpiTorsionStructType);
176 +  MPI_Type_commit(&mpiTorsionStructType);
177 +
178 +  // ***********************************************************************
179 +  
180    if( myNode == 0 ){
181   #endif
182      
183      // generate the force file name
184      
185      strcpy( fileName, "TraPPE_Ex.frc" );
186 <    fprintf( stderr,"Trying to open %s\n", fileName );
186 >    //    fprintf( stderr,"Trying to open %s\n", fileName );
187      
188      // attempt to open the file in the current directory first.
189      
# Line 86 | Line 195 | TraPPE_ExFF::TraPPE_ExFF(){
195        
196        ffPath = getenv( ffPath_env );
197        if( ffPath == NULL ) {
198 <        fprintf( stderr,
198 >        sprintf( errMsg,
199                   "Error opening the force field parameter file: %s\n"
200                   "Have you tried setting the FORCE_PARAM_PATH environment "
201                   "vairable?\n",
202                   fileName );
203 <        exit( 8 );
203 > #ifdef IS_MPI  
204 >        cleanOpen = 0;
205 >        mpiError = MPI_Bcast(cleanOpen,1,MPI_INT,0,MPI_COMM_WORLD);
206 > #endif
207 >        ffError( errMsg );
208        }
209        
210        
# Line 104 | Line 217 | TraPPE_ExFF::TraPPE_ExFF(){
217        
218        if( frcFile == NULL ){
219          
220 <        fprintf( stderr,
220 >        sprintf( errMsg,
221                   "Error opening the force field parameter file: %s\n"
222                   "Have you tried setting the FORCE_PARAM_PATH environment "
223                   "vairable?\n",
224                   fileName );
225 <        exit( 8 );
225 > #ifdef IS_MPI  
226 >        cleanOpen = 0;
227 >        mpiError = MPI_Bcast(cleanOpen,1,MPI_INT,0,MPI_COMM_WORLD);
228 > #endif
229 >        ffError( errMsg );
230        }
231      }
232 +    cleanOpen = 1;
233   #ifdef IS_MPI
234    }
235 +
236 +  mpiError = MPI_Bcast(cleanOpen,1,MPI_INT,0,MPI_COMM_WORLD);
237 +  if( !cleanOpen ) fferror( NULL );
238   #endif
239   }
240  
# Line 178 | Line 299 | void TraPPE_ExFF::initializeAtoms( void ){
299    LinkedType* headAtomType;
300    LinkedType* currentAtomType;
301    LinkedType* tempAtomType;
302 +
303 + #ifdef IS_MPI
304 +  atomStruct info;
305 +  info.last = -1; // initialize last to have the error set.
306 +                  // if things go well, last will be set to 0
307 + #endif
308 +  
309  
310    char readLine[500];
311    char* the_token;
# Line 185 | Line 313 | void TraPPE_ExFF::initializeAtoms( void ){
313    int foundAtom = 0;
314    int lineNum = 0;
315    int i;
316 +  char errMsg[1000];
317 +
318    
319    //////////////////////////////////////////////////
320    // a quick water fix
# Line 225 | Line 355 | void TraPPE_ExFF::initializeAtoms( void ){
355    the_atoms = entry_plug->atoms;
356    nAtoms = entry_plug->n_atoms;
357    
228  // read in the atom types.
229
230  rewind( frcFile );
231  headAtomType = new LinkedType;
232  currentAtomType = headAtomType;
358    
359 <  eof_test = fgets( readLine, sizeof(readLine), frcFile );
360 <  lineNum++;
361 <  if( eof_test == NULL ){
362 <    fprintf( stderr, "Error in reading Atoms from force file.\n" );
363 <    exit(8);
364 <  }
365 <
366 <  
367 <  while( !foundAtom ){
368 <    while( eof_test != NULL && readLine[0] != '#' ){
369 <      eof_test = fgets( readLine, sizeof(readLine), frcFile );
370 <      lineNum++;
246 <    }
359 > #ifdef IS_MPI
360 >  if( myNode == 0 ){
361 > #endif
362 >    
363 >    // read in the atom types.
364 >    
365 >    rewind( frcFile );
366 >    headAtomType = new LinkedType;
367 >    currentAtomType = headAtomType;
368 >    
369 >    eof_test = fgets( readLine, sizeof(readLine), frcFile );
370 >    lineNum++;
371      if( eof_test == NULL ){
372 <      fprintf( stderr,
373 <               "Error in reading Atoms from force file at line %d.\n",
374 <               lineNum );
375 <      exit(8);
372 >      sprintf( errMsg, "Error in reading Atoms from force file.\n" );
373 > #ifdef IS_MPI
374 >      sendFrcStruct( &info, mpiAtomStructType );
375 > #endif
376 >      ffError(errMsg);
377      }
253
254    the_token = strtok( readLine, " ,;\t#\n" );
255    foundAtom = !strcmp( "AtomTypes", the_token );
378      
379 <    if( !foundAtom ){
380 <      eof_test = fgets( readLine, sizeof(readLine), frcFile );
381 <      lineNum++;
382 <
379 >    
380 >    while( !foundAtom ){
381 >      while( eof_test != NULL && readLine[0] != '#' ){
382 >        eof_test = fgets( readLine, sizeof(readLine), frcFile );
383 >        lineNum++;
384 >      }
385        if( eof_test == NULL ){
386 <        fprintf( stderr,
386 >        sprintf( errMsg,
387                   "Error in reading Atoms from force file at line %d.\n",
388                   lineNum );
389 <        exit(8);
390 <      }
389 > #ifdef IS_MPI
390 >        sendFrcStruct( &info, mpiAtomStructType );
391 > #endif
392 >        ffError(errMsg);
393 >      }
394 >      
395 >      the_token = strtok( readLine, " ,;\t#\n" );
396 >      foundAtom = !strcmp( "AtomTypes", the_token );
397 >      
398 >      if( !foundAtom ){
399 >        eof_test = fgets( readLine, sizeof(readLine), frcFile );
400 >        lineNum++;
401 >        
402 >        if( eof_test == NULL ){
403 >          sprintf( errMsg,
404 >                   "Error in reading Atoms from force file at line %d.\n",
405 >                   lineNum );
406 > #ifdef IS_MPI
407 >          sendFrcStruct( &info, mpiAtomStructType );
408 > #endif
409 >          ffError(errMsg);
410 >        }
411 >      }
412      }
268  }
269
270  // we are now at the AtomTypes section.
271
272  eof_test = fgets( readLine, sizeof(readLine), frcFile );
273  lineNum++;
274  
275  if( eof_test == NULL ){
276    fprintf( stderr,
277             "Error in reading Atoms from force file at line %d.\n",
278             lineNum );
279    exit(8);
280  }
281
282  while( readLine[0] != '#' && eof_test != NULL ){
413      
414 <    if( readLine[0] != '!' ){
414 >    // we are now at the AtomTypes section.
415 >    
416 >    eof_test = fgets( readLine, sizeof(readLine), frcFile );
417 >    lineNum++;
418 >    
419 >    if( eof_test == NULL ){
420 >      sprintf( errMsg,
421 >               "Error in reading Atoms from force file at line %d.\n",
422 >               lineNum );
423 > #ifdef IS_MPI
424 >      sendFrcStruct( &info, mpiAtomStructType );
425 > #endif      
426 >      ffError(errMsg);
427 >    }
428 >    
429 >    while( readLine[0] != '#' && eof_test != NULL ){
430        
431 <      the_token = strtok( readLine, " \n\t,;" );
287 <      if( the_token != NULL ){
431 >      if( readLine[0] != '!' ){
432          
433 <        strcpy( currentAtomType->name, the_token );
434 <
435 <        if( ( the_token = strtok( NULL, " \n\t,;" ) ) == NULL ){
436 <          fprintf( stderr, "Error parseing AtomTypes: line %d\n", lineNum );
437 <          exit(8);
294 <        }
295 <
296 <        sscanf( the_token, "%d", &currentAtomType->isDipole );
297 <
298 <        if( ( the_token = strtok( NULL, " \n\t,;" ) ) == NULL ){
299 <          fprintf( stderr, "Error parseing AtomTypes: line %d\n", lineNum );
300 <          exit(8);
301 <        }
302 <
303 <        sscanf( the_token, "%lf", &currentAtomType->mass );
304 <
305 <        if( ( the_token = strtok( NULL, " \n\t,;" ) ) == NULL ){
306 <          fprintf( stderr, "Error parseing AtomTypes: line %d\n", lineNum );
307 <          exit(8);
308 <        }
309 <        
310 <        sscanf( the_token, "%lf", &currentAtomType->epslon );
311 <        
312 <        if( ( the_token = strtok( NULL, " \n\t,;" ) ) == NULL ){
313 <          fprintf( stderr, "Error parseing AtomTypes: line %d\n", lineNum );
314 <          exit(8);
315 <        }
316 <
317 <        sscanf( the_token, "%lf", &currentAtomType->sigma );
318 <        
319 <        if( currentAtomType->isDipole ){
433 >        the_token = strtok( readLine, " \n\t,;" );
434 >        if( the_token != NULL ){
435 >          
436 >          strcpy( currentAtomType->name, the_token );
437 >          
438            if( ( the_token = strtok( NULL, " \n\t,;" ) ) == NULL ){
439 <            fprintf( stderr, "Error parseing AtomTypes: line %d\n", lineNum );
440 <            exit(8);
439 >            sprintf( errMsg, "Error parseing AtomTypes: line %d\n", lineNum );
440 > #ifdef IS_MPI
441 >            sendFrcStruct( &info, mpiAtomStructType );
442 > #endif
443 >            ffError(errMsg);
444            }
445            
446 <          sscanf( the_token, "%lf", &currentAtomType->dipole );
446 >          sscanf( the_token, "%d", &currentAtomType->isDipole );
447 >          
448 >          if( ( the_token = strtok( NULL, " \n\t,;" ) ) == NULL ){
449 >            sprintf( errMsg, "Error parseing AtomTypes: line %d\n", lineNum );
450 > #ifdef IS_MPI
451 >            sendFrcStruct( &info, mpiAtomStructType );
452 > #endif
453 >            ffError(errMsg);
454 >          }
455 >          
456 >          sscanf( the_token, "%lf", &currentAtomType->mass );
457 >          
458 >          if( ( the_token = strtok( NULL, " \n\t,;" ) ) == NULL ){
459 >            sprintf( errMsg, "Error parseing AtomTypes: line %d\n", lineNum );
460 > #ifdef IS_MPI
461 >            sendFrcStruct( &info, mpiAtomStructType );
462 > #endif
463 >            ffError(errMsg);
464 >          }
465 >          
466 >          sscanf( the_token, "%lf", &currentAtomType->epslon );
467 >          
468 >          if( ( the_token = strtok( NULL, " \n\t,;" ) ) == NULL ){
469 >            sprintf( errMsg, "Error parseing AtomTypes: line %d\n", lineNum );
470 > #ifdef IS_MPI
471 >            sendFrcStruct( &info, mpiAtomStructType );
472 > #endif
473 >            ffError(errMsg);
474 >          }
475 >          
476 >          sscanf( the_token, "%lf", &currentAtomType->sigma );
477 >          
478 >          if( currentAtomType->isDipole ){
479 >            if( ( the_token = strtok( NULL, " \n\t,;" ) ) == NULL ){
480 >              sprintf( errMsg, "Error parseing AtomTypes: line %d\n",
481 >                       lineNum );
482 > #ifdef IS_MPI
483 >              sendFrcStruct( &info, mpiAtomStructType );
484 > #endif
485 >              ffError(errMsg);
486 >            }
487 >            
488 >            sscanf( the_token, "%lf", &currentAtomType->dipole );
489 >          }
490          }
491        }
492 +      
493 +      tempAtomType = new LinkedType;
494 +      currentAtomType->next = tempAtomType;
495 +      currentAtomType = tempAtomType;
496 +      
497 +      eof_test = fgets( readLine, sizeof(readLine), frcFile );
498 +      lineNum++;
499      }
500 +
501 + #ifdef IS_MPI
502      
503 <    tempAtomType = new LinkedType;
331 <    currentAtomType->next = tempAtomType;
332 <    currentAtomType = tempAtomType;
503 >    // send out the linked list to all the other processes
504      
505 <    eof_test = fgets( readLine, sizeof(readLine), frcFile );
506 <    lineNum++;
505 >    currentAtomType = headAtomType;
506 >    while( currentAtomType != NULL ){
507 >      currentAtomType->duplicate( info );
508 >      sendFrcStruct( &info, mpiAtomStructType );
509 >      currentAtomType = currentAtomType->next;
510 >    }
511 >    info.last = 1;
512 >    sendFrcStruct( &info, mpiAtomStructType );
513 >    
514 >  }
515 >
516 >  else{
517 >    
518 >    // listen for node 0 to send out the force params
519 >
520 >    headAtomType = new LinkedType;
521 >    recieveFrcStruct( &info, mpiAtomStructType );
522 >    while( !info.last ){
523 >
524 >      headAtomType->add( info );
525 >      recieveFrcStruct( &info, mpiAtomStructType );
526 >    }
527 >
528 >    if( info.last < 0 ) ffError( NULL ); // an error has occured, exit quietly.
529 >
530 >    
531    }
532 + #endif
533  
534    
535    // initialize the atoms
# Line 344 | Line 540 | void TraPPE_ExFF::initializeAtoms( void ){
540      
541      currentAtomType = headAtomType->find( the_atoms[i]->getType() );
542      if( currentAtomType == NULL ){
543 <      fprintf( stderr, "AtomType error, %s not found in force file.\n",
543 >      sprintf( errMsg, "AtomType error, %s not found in force file.\n",
544                 the_atoms[i]->getType() );
545 <      exit(8);
545 >      ffError(errMsg);
546      }
547      
548      the_atoms[i]->setMass( currentAtomType->mass );
# Line 373 | Line 569 | void TraPPE_ExFF::initializeAtoms( void ){
569            dAtom->setSSD( 0 );
570          }
571          else{
572 <          fprintf(stderr,
572 >          sprintf(errMsg,
573                    "AtmType error, %s does not have a moment of inertia set.\n",
574                    the_atoms[i]->getType() );
575 <          exit(8);
575 >          ffError(errMsg);
576          }
577          entry_plug->n_dipoles++;
578        }
579        else{
580 <        std::cerr
581 <          << "TraPPE_ExFF error: Atom \""
582 <          << currentAtomType->name << "\" is a dipole, yet no standard"
583 <          << " orientation was specifed in the BASS file.\n";
584 <        exit(8);
580 >        
581 >        sprintf( errMsg,
582 >                "TraPPE_ExFF error: Atom \"%s\" is a dipole, yet no standard"
583 >                 " orientation was specifed in the BASS file.\n",
584 >                 currentAtomType->name );
585 >        
586 >        ffError(errMsg);
587        }
588      }
589      else{
590        if( the_atoms[i]->isDirectional() ){
591 <        std::cerr
592 <          << "TraPPE_ExFF error: Atom \""
593 <          << currentAtomType->name << "\" was given a standard orientation"
594 <          << " in the BASS file, yet it is not a dipole.\n";
595 <        exit(8);
591 >        sprintf( errMsg,
592 >                 "TraPPE_ExFF error: Atom \"%s\" was given a standard"
593 >                 "orientation in the BASS file, yet it is not a dipole.\n",
594 >                 currentAtomType->name);
595 >        ffError(errMsg);
596        }
597      }
598    }
# Line 424 | Line 622 | void TraPPE_ExFF::initializeBonds( bond_pair* the_bond
622        return NULL;
623      }
624      
625 + #ifdef IS_MPI
626 +    void add( bondStruct &info ){
627 +      if( next != NULL ) next->add(info);
628 +      else{
629 +        next = new LinkedType();
630 +        strcpy(next->nameA, info.nameA);
631 +        strcpy(next->nameB, info.nameB);
632 +        strcpy(next->type,  info.type);
633 +        next->d0 = info.d0;
634 +      }
635 +    }
636 +    
637 +    void duplicate( bondStruct &info ){
638 +      strcpy(info.nameA, nameA);
639 +      strcpy(info.nameB, nameB);
640 +      strcpy(info.type,  type);
641 +      info.d0   = d0;
642 +      info.last = 0;
643 +    }
644 +
645 +
646 + #endif
647 +
648      char nameA[15];
649      char nameB[15];
650      char type[30];
# Line 614 | Line 835 | void TraPPE_ExFF::initializeBends( bend_set* the_bends
835        return NULL;
836      }
837      
838 + #ifdef IS_MPI
839 +
840 +    void add( bendStruct &info ){
841 +      if( next != NULL ) next->add(info);
842 +      else{
843 +        next = new LinkedType();
844 +        strcpy(next->nameA, info.nameA);
845 +        strcpy(next->nameB, info.nameB);
846 +        strcpy(next->nameC, info.nameC);
847 +        strcpy(next->type,  info.type);
848 +        next->k1 = info.k1;
849 +        next->k2 = info.k2;
850 +        next->k3 = info.k3;
851 +        next->t0 = info.t0;
852 +      }
853 +    }
854 +    
855 +    void duplicate( bendStruct &info ){
856 +      strcpy(info.nameA, nameA);
857 +      strcpy(info.nameB, nameB);
858 +      strcpy(info.nameC, nameC);
859 +      strcpy(info.type,  type);
860 +      info.k1   = k1;
861 +      info.k2   = k2;
862 +      info.k3   = k3;
863 +      info.t0   = t0;
864 +      info.last = 0;
865 +    }
866 +
867 + #endif
868 +
869      char nameA[15];
870      char nameB[15];
871      char nameC[15];
# Line 840 | Line 1092 | void TraPPE_ExFF::initializeTorsions( torsion_set* the
1092  
1093        if( next != NULL ) return next->find(key1, key2, key3, key4);
1094        return NULL;
1095 +    }
1096 +    
1097 + #ifdef IS_MPI
1098 +
1099 +    void add( torsionStruct &info ){
1100 +      if( next != NULL ) next->add(info);
1101 +      else{
1102 +        next = new LinkedType();
1103 +        strcpy(next->nameA, info.nameA);
1104 +        strcpy(next->nameB, info.nameB);
1105 +        strcpy(next->nameC, info.nameC);
1106 +        strcpy(next->type,  info.type);
1107 +        next->k1 = info.k1;
1108 +        next->k2 = info.k2;
1109 +        next->k3 = info.k3;
1110 +        next->k4 = info.k4;
1111 +      }
1112      }
1113      
1114 +    void duplicate( torsionStruct &info ){
1115 +      strcpy(info.nameA, nameA);
1116 +      strcpy(info.nameB, nameB);
1117 +      strcpy(info.nameC, nameC);
1118 +      strcpy(info.nameD, nameD);
1119 +      strcpy(info.type,  type);
1120 +      info.k1   = k1;
1121 +      info.k2   = k2;
1122 +      info.k3   = k3;
1123 +      info.k4   = k4;
1124 +      info.last = 0;
1125 +    }
1126 +
1127 + #endif
1128 +
1129      char nameA[15];
1130      char nameB[15];
1131      char nameC[15];

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines