New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
An error occurred when building the MPAS. #695
Comments
@zhangjiang-dev, we would need to know considerably more about where you're trying to build the model to be very helpful in responding to your question. As a starting point, though, I'm providing a PDF of the instructions we share with one another internally in the group to get MPAS-Ocean building on various systems we use. Please see how far you can get with those suggestions. If you are still having trouble, please provide us with quite a bit more details on what operating system, machine, compilers, MPI, etc. etc. you are using and we may be able to help you as we have time. It would also be helpful for us to know how you plan to use the code. Keep in mind, though, that we are coming up against a major deadline for our code release and our time may be very limited at the moment. ECG-MPASTestingandMachine-specificInstructions-150920-1448.pdf |
@zhangjiang-dev It's probably as easy as setting the PIO environment variable in your case to /usr/local |
Thank you for the documentation!But it didn't solve my problem. |
I set the PIO environment variables as follows: |
Looks correct, assuming the pio installation is good. As Xylar says, to go any further, we need a lot more info about where you're running, what compilers you're using, what projects you're working on, etc... |
Before building mpas_ocean,i have installed the following dependency packages: Could you provide me with a copy of the mpas - ocean executable that you compiled? The file format is nc. Thanke you very very much! |
My machine environment is as follows: |
@zhangjiang-dev, I think you may just need to set this additional environment variable:
With our current development branch (
We do not currently provide compiled binaries. None of our collaborators so far is on a generic enough system that this would be useful. So we only support building from source code. Please keep in mind that, while this is an open source project, we have quite limited time for supporting projects that are not part of our collaborations funded by the US Department of Energy or other partner agencies. This is, in part, why it would be helpful to know a little more about what you are hoping to accomplish with MPAS-Ocean. We may be able to quickly tell you if it is likely to be easy for you to get started on your own (once the code compiles) or whether it is a project that might require a lot of expertise from MPAS-Ocean developers that we are unlikely to be able to provide at this time. |
Hello, |
If you look at that line, it actually generates an extremely simple file to compile. |
@afernandezody If you're seeing the same issue with the atmosphere core, we have a support forum for MPAS-Atmosphere where you could post your question: https://forum.mmm.ucar.edu/ . Just be sure to post in the correct section of the forum. As @philipwjones said, though, the test program is generated by the top-level |
Hi @philipwjones, |
@afernandezody it is removed immediately after writing the pio message (see rm -rf pio[12].f90). Note that this is also how tools like CMake look for a working MPI, etc. |
BTW, note that when it tries to build this simple code, it redirects output to /dev/null I've never tried to see what happens if you remove that redirection and see what happens - might get some additional info on why it's failing. |
You're right, the script now makes sense (once I paid attention to all the details). The problem seems to be that the configuration assumes x86_64 architecture whereas the system is arm-powered. |
Hi @philipwjones, I was able to fix the previous issue by fitting the flags to arm architecture. I did this manually, which is not an optimal method, so maybe this could be a future enhancement (I don't know about the ramifications of it and you can weight its convenience). However, I'm getting a new error: |
@afernandezody As @mgduda suggests above, the atmosphere folks maintain a support forum and that's probably a better path for you. I only responded earlier because I've messed with this before and happened to know the answer to your initial questions. For both of these issues reported here, there appears to be something specific to your machine and environment or maybe the pio build (eg did it build the fortran interfaces correctly and drop the mod file in the right place?). Anyway, you'll probably get a faster response there. |
Hi @philipwjones and @mgduda, |
I've run into a similar problem in nightly testing on the landice/develop branch. It seems to be caused by a recent change to PIO NCAR/ParallelIO#1659 which writes a Line 461 in 51d5624
My quick fix locally is to replace that line with: |
On the E3SM side, we're using scorpio (our pio variant with pio2 interfaces that supports ADIOS for more performant I/O). It does not have a .settings file so that proposed fix wouldn't work. But I think this points to an issue with the current approach in the Makefile - and I've hit similar problems with CMake and attempts to detect MPI installations. The failure to build the test code can happen for a number of reasons - most frequently due to a missing/bad PIO environment variable which it reports fine. But it can fail for a number of mis-configured compiler/loader flags too. That appears to be the case with some of the failures reported here where the problem is due to a misconfigured build target or changes to pio and its includes/libs. So it might help to actually not redirect build output to /dev/null so we get an actual error message from the test build for further diagnosis? Or figure out a way to trap the different potential error modes and return a more useful message. |
The following change worked for me with both
I'll put in a PR to |
when i use ‘make gfortran CORE=ocean’ this command to build mpas,but the program occurred an error,as follows.
the directory of pio installation is '/usr/local/lib,/usr/local/include',How should I specify the environment variable of pio?
thanks !
Checking for a usable PIO library...
************ ERROR ************
Failed to compile a PIO test program
Please ensure the PIO environment variable is set to the PIO installation directory
************ ERROR ************
make[1]: *** [pio_test] Error 1
make[1]: Leaving directory `/opt/mpas/MPAS-Model-master'
make: *** [gfortran] Error 2
The text was updated successfully, but these errors were encountered: