Scheduled Downtime
On Friday 21 April 2023 @ 5pm MT, this website will be down for maintenance and expected to return online the morning of 24 April 2023 at the latest

WRFV4 with PGI - dmpar

This post was from a previous version of the WRF&MPAS-A Support Forum. New replies have been disabled and if you have follow up questions related to this post, then please start a new thread from the forum home page.

Doofus

New member
Hello WRF forum,

I have a question involving WRFV4 compilation using PGI 17.5.
I currently have this working in singular (./configuration number 52), but my plan is to use GSI, which uses dmpar only, so I would like to compile this with option 54, the dmpar setting.

I cannot get past this error, I am not sure why it keeps popping up. I am a little confused at why I get gfortran errors when I am selecting a pgf90/pgcc settings. I hope you know the answers!

I have attached the ./compile em_real >& compile_dmpar.log file.
All the best.
 

Attachments

  • compile_dmpar.log
    1 MB · Views: 65
Hi,

I see several errors like this in your compile log:
gfortran: error: unrecognized command line option ‘-r4’; did you mean ‘-r’?
gfortran: error: unrecognized command line option ‘-i4’
gfortran: error: unrecognized command line option ‘-Mfree’; did you mean ‘-free’?
gfortran: error: unrecognized command line option ‘-byteswapio’

Are you using a script to compile this, or simply compiling in the command line? If you are using a script, can you try to just do it in the command line?

If not, can you send your configure.wrf file and let me take a look at that?
 
I am doing this in a linux terminal only. I just use:
./compile em_real >& compile_dmpar.log

All the best.
 
Hi,
Even though you are using a PGI compiler, a gfortran compiler is necessary in addition because the majority of the WRF/WPS code is written in Fortran. Can you issue this:

gfortran --version

and send me what is printed out from that?
 
kwerner said:
Hi,
Even though you are using a PGI compiler, a gfortran compiler is necessary in addition because the majority of the WRF/WPS code is written in Fortran. Can you issue this:

gfortran --version

and send me what is printed out from that?

Sure, here it is:

GNU Fortran (GCC) 6.3.1 20170216 (Red Hat 6.3.1-3)
Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
Hi,

Okay, so this actually DOES involve the compiler you are using (and it's not just related to the fact that WRF code relies on a fortran compiler during the build). Do you have modules on your system? If so, it looks like your module is likely set to a GNU compiler, but you are choosing a PGI option during the configure, which causes the errors you see listed in your compile log. If you switch your module to point to the correct PGI compiler, then 'clean -a' and reconfigure, hopefully this should correct the problem. Let me know!
 
I do not understand what you mean by modules. I asked the IT team and they didn't know either. What do you mean by this?
Sorry!
 
Hi,

Okay, then I guess it's likely that you are NOT using modules if the IT team doesn't even know! :)
Many times HPC systems, or large clusters have a module system on their server. This means that they have several programs, libraries, compilers, etc. available, and you just have to load the appropriate ones. So on my system, I could choose PGI, GNU, or Intel compilers. I simply load one of those, and it automatically updates the netCDF library and other necessary components that must be used with whichever compiler I choose (i.e., if I'm using a GNU compiler, I must use the netCDF library that was built with that exact GNU compiler).

The error message does indicate that your system seems to think you are using a GNU compiler, though. Do you have any environment settings that may be overriding your choice during the configuration? This may be something you need to discuss with your systems administrators to see if you can figure out why this is happening. Let me know what you figure out!
 
The environment settings I am choosing are:
export CC=pgcc
export FC=pgfortran
export LD=pgfortran
export F90=pgfortran
export FFLAGS="-O2 -Msignextend"
export CXX=pgcpp
export CPPFLAGS="-DpgiFortran"
Am i missing any which are recommended? Or maybe some of these are wrong?
My netCDF is compiled with PGI also:
echo $NETCDF
/usr/local/netcdf-4.6.1_pgi-175
 
Hi,
Sometimes there are "hidden" environment settings that are controlled by the server, by an over-powering script, or can sometimes occur when using a dual-booting machine (e.g., a Windows machine, with Linux built parallel to Windows). This may not be the cause of the problem, but you need to work with your S.A. (or I.T.) to see what is going on.
 
Hi,

So this is my environment log, with all the information (see attached)
I see it does link to gfortran for the MPI_FORTRAN_MOD_DIR variable, would this need to be changed?

Thank you
 

Attachments

  • env.log
    6.2 KB · Views: 66
Hi,

No, that didn't help. I have attached the new log file.
I am unsure how to solve this though, there seem to be a lot of errors, including gfortran ones.
 

Attachments

  • compile_new.log
    1 MB · Views: 61
Hi,

The errors are still the same as the original log file. I previously suggested that you run this issue by someone in your system administrative group at your institution, as it seems to be a specific computer/environment problem. Have you done that yet?
 
Hi,

I did speak to IT. I had a lot of problems with my system. This seems to be fixed as for 1 hour ago.
I think my problem now is environmental. I attacked the compile and the env files.

I am a bit unsure why this isn't working. It doesn't seem to be finding mpif.h but I have no idea why!
Any ideas?

Thank you for your help.
 

Attachments

  • compile_54.log
    849.8 KB · Views: 53
  • configure.wrf
    20.2 KB · Views: 60
  • env.log
    4.1 KB · Views: 63
Hi,

I'm glad to hear that you were finally able to get past the initial error!

Can you issue this command:

ls -ls /usr/local/mpich-3.0.4_pgi-175/include >& include.txt

and send me the include.txt file? Thanks!
 
I do see that you have your mpif.h file in the include/directory, so that's good; however, there are several settings related to MPI in your environment settings. Can you try to un-set all of these and see if it makes a difference:

MPI_LIB=/usr/local/mpich-3.0.4_pgi-175/lib
MPI_BIN=/usr/local/mpich-3.0.4_pgi-175/bin
MPI_COMPILER=/usr/local/mpich-3.0.4_pgi-175/bin/mpicc
MPI_SYSCONFIG=/usr/local/mpich-3.0.4_pgi-175/etc
MPI_DIR=/usr/local/mpich-3.0.4_pgi-175
FC=/usr/local/mpich-3.0.4_pgi-175/bin/mpif90
MPI_MAN=/usr/local/mpich-3.0.4_pgi-175/share/man
MPI_FORTRAN_MOD_DIR=/usr/local/mpich-3.0.4_pgi-175/include
MPI_HOME=/usr/local/mpich-3.0.4_pgi-175
MPIDIR=/usr/local/mpich-3.0.4_pgi-175
 
Top