File tree Expand file tree Collapse file tree 2 files changed +10
-7
lines changed Expand file tree Collapse file tree 2 files changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -497,19 +497,22 @@ void Run::parse_velocity(const char** param, int num_param)
497497 bool use_seed = false ;
498498 if (!(num_param == 2 || num_param == 4 )) {
499499 PRINT_INPUT_ERROR (" velocity should have 1 or 2 parameters.\n " );
500+ } else if (num_param == 4 ) {
501+ // See https://github.com/brucefan1983/GPUMD/pull/768
502+ // for the reason for putting this branch here.
503+ use_seed = true ;
504+ if (!is_valid_int (param[3 ], &seed)) {
505+ PRINT_INPUT_ERROR (" seed should be a positive integer.\n " );
506+ }
500507 }
508+
501509 if (!is_valid_real (param[1 ], &initial_temperature)) {
502510 PRINT_INPUT_ERROR (" initial temperature should be a real number.\n " );
503511 }
504512 if (initial_temperature <= 0.0 ) {
505513 PRINT_INPUT_ERROR (" initial temperature should be a positive number.\n " );
506514 }
507- if (num_param == 4 ) {
508- use_seed = true ;
509- if (!is_valid_int (param[3 ], &seed)) {
510- PRINT_INPUT_ERROR (" seed should be a positive integer.\n " );
511- }
512- }
515+
513516 velocity.initialize (
514517 has_velocity_in_xyz,
515518 initial_temperature,
Original file line number Diff line number Diff line change 1414# some flags
1515###########################################################
1616CC = hipcc
17- CFLAGS = -std=c++14 -O1 --offload-arch=gfx90a -DUSE_HIP
17+ CFLAGS = -std=c++14 -O3 --offload-arch=gfx90a -DUSE_HIP
1818INC = -I./
1919LDFLAGS =
2020LIBS = -lhipblas -lhipsolver
You can’t perform that action at this time.
0 commit comments