@@ -27,6 +27,10 @@ TEST_CASE("GridFromFile") {
2727 scf::load_modules (mm);
2828 auto & mod = mm.at (" Grid From File" );
2929
30+ int process_rank;
31+ MPI_Comm_rank (mm.get_runtime ().mpi_comm (), &process_rank);
32+ auto rank_str = std::to_string (process_rank);
33+
3034 auto h2 = test_scf::make_h2<chemist::Molecule>();
3135
3236 SECTION (" file doesn't exist" ) {
@@ -36,7 +40,7 @@ TEST_CASE("GridFromFile") {
3640 }
3741
3842 SECTION (" only three points" ) {
39- std::filesystem::path p = " unit_test_pretend_h2_grid .txt" ;
43+ std::filesystem::path p = " only_three_points " + rank_str + " .txt" ;
4044 std::ofstream file (p);
4145 file << " 1.0 2.0 3.0\n " ;
4246 file << " 5.0 6.0 7.0 8.0\n " ;
@@ -47,7 +51,7 @@ TEST_CASE("GridFromFile") {
4751 }
4852
4953 SECTION (" five numbers points" ) {
50- std::filesystem::path p = " unit_test_pretend_h2_grid .txt" ;
54+ std::filesystem::path p = " five_numbers_points " + rank_str + " .txt" ;
5155 std::ofstream file (p);
5256 file << " 1.0 2.0 3.0 4.0 5.0\n " ;
5357 file << " 5.0 6.0 7.0 8.0\n " ;
@@ -58,7 +62,7 @@ TEST_CASE("GridFromFile") {
5862 }
5963
6064 SECTION (" non-mumeric data" ) {
61- std::filesystem::path p = " unit_test_pretend_h2_grid .txt" ;
65+ std::filesystem::path p = " non-numeric_data " + rank_str + " .txt" ;
6266 std::ofstream file (p);
6367 file << " 1.0 2.0 3.0 hello\n " ;
6468 file << " 5.0 6.0 7.0 8.0\n " ;
@@ -69,7 +73,7 @@ TEST_CASE("GridFromFile") {
6973 }
7074
7175 SECTION (" good file" ) {
72- std::filesystem::path p = " unit_test_pretend_h2_grid .txt" ;
76+ std::filesystem::path p = " good_file " + rank_str + " .txt" ;
7377 std::ofstream file (p);
7478 file << " 1.0 2.0 3.0 4.0\n " ;
7579 file << " 5.0 6.0 7.0 8.0\n " ;
@@ -89,7 +93,7 @@ TEST_CASE("GridFromFile") {
8993 }
9094
9195 SECTION (" skip blank line" ) {
92- std::filesystem::path p = " unit_test_pretend_h2_grid .txt" ;
96+ std::filesystem::path p = " skip_blank_line " + rank_str + " .txt" ;
9397 std::ofstream file (p);
9498 file << " 1.0 2.0 3.0 4.0\n " ;
9599 file << " \n " ;
0 commit comments