Beginners > Installation questions

PhreeqcRM: Testsuite Fail

(1/4) > >>

kayakernate:
Dear Dr. Parkhurst,

Hello! My name is Nathan. I am an undergrad at the University of Oregon and Iím currently trying to set up PhreeqcRM for an independent C++ project.

I am currently trying to build the PhreeqcRM module from source. My system is macOS Catalina 10.15.5. I am following these instructions: https://water.usgs.gov/water-resources/software/PHREEQC/README.PhreeqcRM.12927.TXT

I have opened the tarball file, and I have created the Release_openmp directory. I have executed ../configure from within that directory, and everything came back great. I ran "make", and I had no errors. But then I ran "make check":


--- Code: ---Making check in database
make[1]: Nothing to be done for `check'.
Making check in doc
make[1]: Nothing to be done for `check'.
Making check in Doxygen
make[1]: Nothing to be done for `check'.
Making check in Tests
/Applications/Xcode.app/Contents/Developer/usr/bin/make  test
  CC       advection_c.o
  CXX      advection_cpp.o
  CXX      main.o
  CC       species_c.o
  CXX      species_cpp.o
  GEN      test
/Applications/Xcode.app/Contents/Developer/usr/bin/make  check-TESTS
../../config/test-driver: line 107: 50263 Abort trap: 6           "$@" > $log_file 2>&1
FAIL: test
============================================================================
Testsuite summary for PhreeqcRM 3.6.2-15100
============================================================================
# TOTAL: 1
# PASS:  0
# SKIP:  0
# XFAIL: 0
# FAIL:  1
# XPASS: 0
# ERROR: 0
============================================================================
See Tests/test-suite.log
Please report to dlpark@usgs.gov
============================================================================
make[3]: *** [test-suite.log] Error 1
make[2]: *** [check-TESTS] Error 2
make[1]: *** [check-am] Error 2
make: *** [check-recursive] Error 1
--- End code ---

It advised me to report this to you. Would you be able to clarify what I am doing wrong?
I am very new to PHREEQC, so any tips and pointers to resources are greatly appreciated.

Best,
Nathan

kayakernate:
Follow up: I tried redownloading it and going through the process again and I noticed that when I run make for the first time in the Release_openmp directory I get all these warnings:


--- Code: ---../src/IPhreeqcPhast/IPhreeqc/phreeqcpp/print.cpp:1486:67: warning: illegal character encoding in string literal [-Winvalid-source-encoding]
                           "Molality", "Activity", "Molality", "Activity", "Gamma", "cm<B3>/mol"));
                                                                                       ^~~~
../src/IPhreeqcPhast/IPhreeqc/phreeqcpp/print.cpp:1654:46: warning: illegal character encoding in string literal [-Winvalid-source-encoding]
                                output_msg(sformatf("\t%11.3e  sigma, C/m<B2>\n",
                                                                         ^~~~
../src/IPhreeqcPhast/IPhreeqc/phreeqcpp/print.cpp:1665:49: warning: illegal character encoding in string literal [-Winvalid-source-encoding]
                                output_msg(sformatf("\tundefined  sigma, C/m<B2>\n"));
                                                                            ^~~~
../src/IPhreeqcPhast/IPhreeqc/phreeqcpp/print.cpp:1687:37: warning: illegal character encoding in string literal [-Winvalid-source-encoding]
                                                   "\t%11.3e  specific area, m<B2>/mol %s\n",
                                                                              ^~~~
../src/IPhreeqcPhast/IPhreeqc/phreeqcpp/print.cpp:1695:22: warning: illegal character encoding in string literal [-Winvalid-source-encoding]
                                                   "\t%11.3e  m<B2> for %11.3e moles of %s\n\n",
                                                               ^~~~
../src/IPhreeqcPhast/IPhreeqc/phreeqcpp/print.cpp:1708:37: warning: illegal character encoding in string literal [-Winvalid-source-encoding]
                                                   "\t%11.3e  specific area, m<B2>/mol %s\n",
                                                                              ^~~~
../src/IPhreeqcPhast/IPhreeqc/phreeqcpp/print.cpp:1716:22: warning: illegal character encoding in string literal [-Winvalid-source-encoding]
                                                   "\t%11.3e  m<B2> for %11.3e moles of %s\n\n",
                                                               ^~~~
../src/IPhreeqcPhast/IPhreeqc/phreeqcpp/print.cpp:1729:37: warning: illegal character encoding in string literal [-Winvalid-source-encoding]
                                                   "\t%11.3e  specific area, m<B2>/g\n",
                                                                              ^~~~
../src/IPhreeqcPhast/IPhreeqc/phreeqcpp/print.cpp:1735:37: warning: illegal character encoding in string literal [-Winvalid-source-encoding]
                                output_msg(sformatf("\t%11.3e  m<B2> for %11.3e g\n\n",
                                                                ^~~~
../src/IPhreeqcPhast/IPhreeqc/phreeqcpp/print.cpp:1951:40: warning: illegal character encoding in string literal [-Winvalid-source-encoding]
                                                   "\t%11.3e  sigma, plane 0, C/m<B2>\n",
                                                                                 ^~~~
../src/IPhreeqcPhast/IPhreeqc/phreeqcpp/print.cpp:1958:40: warning: illegal character encoding in string literal [-Winvalid-source-encoding]
                                                   "\t%11.3e  sigma, plane 1, C/m<B2>\n",
                                                                                 ^~~~
../src/IPhreeqcPhast/IPhreeqc/phreeqcpp/print.cpp:1965:40: warning: illegal character encoding in string literal [-Winvalid-source-encoding]
                                                   "\t%11.3e  sigma, plane 2, C/m<B2>\n",
                                                                                 ^~~~
../src/IPhreeqcPhast/IPhreeqc/phreeqcpp/print.cpp:1972:46: warning: illegal character encoding in string literal [-Winvalid-source-encoding]
                                                   "\t%11.3e  sigma, diffuse layer, C/m<B2>\n\n",
                                                                                       ^~~~
../src/IPhreeqcPhast/IPhreeqc/phreeqcpp/print.cpp:1981:49: warning: illegal character encoding in string literal [-Winvalid-source-encoding]
                                output_msg(sformatf("\tundefined  sigma, C/m<B2>\n"));
                                                                            ^~~~
../src/IPhreeqcPhast/IPhreeqc/phreeqcpp/print.cpp:2239:31: warning: illegal character encoding in string literal [-Winvalid-source-encoding]
                                   "Specific Conductance (<B5>S/cm, ", tc_x, "<B0>C)  = ", (int) SC));
                                                          ^~~~
../src/IPhreeqcPhast/IPhreeqc/phreeqcpp/print.cpp:2239:48: warning: illegal character encoding in string literal [-Winvalid-source-encoding]
                                   "Specific Conductance (<B5>S/cm, ", tc_x, "<B0>C)  = ", (int) SC));
                                                                              ^~~~
../src/IPhreeqcPhast/IPhreeqc/phreeqcpp/print.cpp:2249:50: warning: illegal character encoding in string literal [-Winvalid-source-encoding]
                output_msg(sformatf("%45s%9.5f", "Density (g/cm<B3>)  = ",
                                                               ^~~~
../src/IPhreeqcPhast/IPhreeqc/phreeqcpp/print.cpp:2303:51: warning: illegal character encoding in string literal [-Winvalid-source-encoding]
        output_msg(sformatf("%45s%6.2f\n", "Temperature (<B0>C)  = ",
--- End code ---

After the process is done and I run "make check" I get the exact same error.

Any help is greatly appreciated.

dlparkhurst:
I thought I posted a reply, but I guess it didn't make it.

Try replacing a line in PhreeqcRM.cpp at about line 8473.

Old line:
//j = backward_mapping_root[0];         /* j is nxyz number */

New line:
j = backward_mapping[0];         /* j is nxyz number */

I'm not sure if this will work. Alternatively, you can try using the define USE_OPENMP.

We will try to get a revised version on the web site, but it may take a while.

kayakernate:
Dear Dr. Parkhurst,

Thank you very much for your response!

Here is what I saw in the source code at line 8472, it looks a little different from what you said - backward_mapping_root appears to be a 2D array in my version:


--- Code: ---#else
                                //j = backward_mapping_root[i][0];                   /* j is nxyz number */
                                phast_iphreeqc_worker->Get_cell_clock_times().push_back(- (double) CLOCK());
                                local_chem_mask = this->print_chem_mask_root[j];
--- End code ---

Here's what I changed it to:


--- Code: ---#else
                                j = backward_mapping[i][0];                   /* j is nxyz number */
                                phast_iphreeqc_worker->Get_cell_clock_times().push_back(- (double) CLOCK());
                                local_chem_mask = this->print_chem_mask_root[j];
--- End code ---

I went back to the Release_openmp directory, I reconfigured (../configure), remade (make), and ran make check. Still get the same error.


--- Code: ---../../config/test-driver: line 107: 61213 Abort trap: 6           "$@" > $log_file 2>&1
FAIL: test
============================================================================
Testsuite summary for PhreeqcRM 3.6.2-15100
============================================================================
# TOTAL: 1
# PASS:  0
# SKIP:  0
# XFAIL: 0
# FAIL:  1
# XPASS: 0
# ERROR: 0
============================================================================
See Tests/test-suite.log
Please report to dlpark@usgs.gov
============================================================================
--- End code ---

I then changed the code back to what it was before.

I'm not sure what you mean by using the define USE_OPENMP. I see the ifdef statement in the code:


--- Code: ---#if defined(USE_OPENMP)
#include <omp.h>
--- End code ---

And I see that USE_OPENMP is not defined anywhere in the file. What would I define this to be? The directory where my omp.h file is?

dlparkhurst:
I'm not sure how you compiled PhreeqcRM. Did you use CMake to generate a Makefile?

The latest errors are related to another define used in #ifdef statements. You need to use NO_UTF8_ENCODING.

In Makefiles, you need -DNO_UTF8_ENCODING to avoid the errors about illegal characters.

Similarly, -DUSE_OPENMP would compile the OpenMP version of PhreeqcRM.

If you used CMake, I think it should have determined the right settings for the encoding issue, and in your first post, you did not show these illegal character errors.

I think by default, CMake would compile for for OpenMP. The code change I suggested would not make a difference; it only applied if you were using neither OpenMP nor MPI.

Going all the way back to the beginning, I think you may have successfully generated the PhreeqcRM library, PhreeqcRM.lib. If you still have the directory with the original compilation, check if PhreeqcRM.lib exists somewhere in the directory.

Navigation

[0] Message Index

[#] Next page

Go to full version