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

How to compile WRF using Fujitsu compiler

kinguEnt

Member
Hello WRF Users,

I am trying to install WRF and its libraries on a FUJITSU Supercomputer with an AArch64 CPU architecture.

I successfully compiled WRF and its libraries using the GNU compiler, but when I attempt to run 'wrf.exe', I encounter the following error:
"[WARN] PLE 0611 plexec The program(./wrf.exe) cannot be executed.(nid=0x02be0008)(error=execve failed. Exec format error.)(CODE=9428,0,8)"

The system has different CPU architectures for the login and compute nodes, which I believe might be causing issues. It seems that the executable format is not compatible with the compute nodes, likely due to the differing architectures. I would greatly appreciate for your guidance on how to properly compile WRF and its libraries using the Fujitsu compiler to avoid this issue.

Thank you in advance for your help and suggestions!
 
The easiest way to do this is to build WRF in the compute nodes either via a build job submission or interactive session. Otherwise you will need to have your system (libraries, compilers, etc) set up to do cross-compilation.
 
The easiest way to do this is to build WRF in the compute nodes either via a build job submission or interactive session. Otherwise you will need to have your system (libraries, compilers, etc) set up to do cross-compilation.
I was installing it on the compute node as an interactive session. I loaded the available modules and installed unavailable ones like zlib, jasper, and libpng. With this approach, I successfully installed WRF, and when it came to WPS, I was unsuccessful. One of the problems was that I didn't get the appropriately supported platforms. When I tried to configure 'WPS' using #No '1. Linux x86_64, gfortran (serial)', only ungrib.exe is created. I tried to fix what was suggested in the user group by pasting the following path "-lnetcdff -lnetcdf -L/work/opt/local/aarch64/apps/fj/1.2.31/hdf5/1.12.0/lib -lhdf5hl_fortran -lhdf5_hl -lhdf5_fortran -lhdf5 -lm -lz" into configure.wps, doesn't work. Among the options listed below, which option is appropriate for the Fujitsu compiler during WPS configuration?
./configure
cleardot.gif

Will use NETCDF in dir: /work/opt/local/aarch64/apps/fj/1.2.31/fjmpi/1.2.31/netcdf-fortran-parallel/4.5.3
Using WRF I/O library in WRF build identified by $WRF_DIR: /work/h41000/WRF/WRF
Found Jasper environment variables for GRIB2 support...
$JASPERLIB = /work/h41000/WRF/libs/grib2/lib
$JASPERINC = /work/h41000/WRF/libs/grib2/include
------------------------------------------------------------------------
Please select from among the following supported platforms.

1. Linux x86_64, gfortran (serial)
2. Linux x86_64, gfortran (serial_NO_GRIB2)
3. Linux x86_64, gfortran (dmpar)
4. Linux x86_64, gfortran (dmpar_NO_GRIB2)
5. Linux x86_64, PGI compiler (serial)
6. Linux x86_64, PGI compiler (serial_NO_GRIB2)
7. Linux x86_64, PGI compiler (dmpar)
8. Linux x86_64, PGI compiler (dmpar_NO_GRIB2)
9. Linux x86_64, PGI compiler, SGI MPT (serial)
10. Linux x86_64, PGI compiler, SGI MPT (serial_NO_GRIB2)
11. Linux x86_64, PGI compiler, SGI MPT (dmpar)
12. Linux x86_64, PGI compiler, SGI MPT (dmpar_NO_GRIB2)
13. Linux x86_64, IA64 and Opteron (serial)
14. Linux x86_64, IA64 and Opteron (serial_NO_GRIB2)
15. Linux x86_64, IA64 and Opteron (dmpar)
16. Linux x86_64, IA64 and Opteron (dmpar_NO_GRIB2)
17. Linux x86_64, Intel compiler (serial)
18. Linux x86_64, Intel compiler (serial_NO_GRIB2)
19. Linux x86_64, Intel compiler (dmpar)
20. Linux x86_64, Intel compiler (dmpar_NO_GRIB2)
21. Linux x86_64, Intel compiler, SGI MPT (serial)
22. Linux x86_64, Intel compiler, SGI MPT (serial_NO_GRIB2)
23. Linux x86_64, Intel compiler, SGI MPT (dmpar)
24. Linux x86_64, Intel compiler, SGI MPT (dmpar_NO_GRIB2)
25. Linux x86_64, Intel compiler, IBM POE (serial)
26. Linux x86_64, Intel compiler, IBM POE (serial_NO_GRIB2)
27. Linux x86_64, Intel compiler, IBM POE (dmpar)
28. Linux x86_64, Intel compiler, IBM POE (dmpar_NO_GRIB2)
29. Linux x86_64 g95 compiler (serial)
30. Linux x86_64 g95 compiler (serial_NO_GRIB2)
31. Linux x86_64 g95 compiler (dmpar)
32. Linux x86_64 g95 compiler (dmpar_NO_GRIB2)
33. Cray XE/XC CLE/Linux x86_64, Cray compiler (serial)
34. Cray XE/XC CLE/Linux x86_64, Cray compiler (serial_NO_GRIB2)
35. Cray XE/XC CLE/Linux x86_64, Cray compiler (dmpar)
36. Cray XE/XC CLE/Linux x86_64, Cray compiler (dmpar_NO_GRIB2)
37. Cray XC CLE/Linux x86_64, Intel compiler (serial)
38. Cray XC CLE/Linux x86_64, Intel compiler (serial_NO_GRIB2)
39. Cray XC CLE/Linux x86_64, Intel compiler (dmpar)
40. Cray XC CLE/Linux x86_64, Intel compiler (dmpar_NO_GRIB2)
 
The easiest way to do this is to build WRF in the compute nodes either via a build job submission or interactive session. Otherwise you will need to have your system (libraries, compilers, etc) set up to do cross-compilation.
Hi @islas,

I compiled WRF using the Fujitsu compiler by loading the necessary modules and installing any missing ones. For the compilation, I used option 82 (one of the Fujitsu-specific options).
However, I am facing challenges with compiling WPS. Despite making edits to the configure.wps file as needed, the three expected executables (geogrid.exe, ungrib.exe, and metgrid.exe) were not created.
Could you please provide any suggestions or guidance on what I might be missing? Your assistance would be greatly appreciated.
Thank you in advance for your help.
 
It looks like there may be two main problems. The first is since the netcdf libraries you have are static archives, there are a lot of missing symbols for HDF5. The second is the stanza flags. There are still some gfortran-specific flags in the Fujitsu configuration you've put together (namely `-ffixed-form` => `-Fixed`, `-fconvert=big-endian` => ??? (I don't see an equivalent from the WRF stanza), `-frecord-marker=4` => ???).
 
It looks like there may be two main problems. The first is since the netcdf libraries you have are static archives, there are a lot of missing symbols for HDF5. The second is the stanza flags. There are still some gfortran-specific flags in the Fujitsu configuration you've put together (namely `-ffixed-form` => `-Fixed`, `-fconvert=big-endian` => ??? (I don't see an equivalent from the WRF stanza), `-frecord-marker=4` => ???).
Thank you for your quick response. FYI, I configure the WPS by selecting "1. Linux x86_64, gfortran (serial)" option. So, do you think, the second problem you mentioned may be associated with this? What option do you recommend to me is better for compiling WPS using the Fujitsu compiler?
 
Yes, I think that may be the issue especially as it is resulting in gfortran option being passed to the Fujitsu compiler. Something like :
Code:
########################################################################################################################
#ARCH    Fujitsu Linux x86_64 SPARC64IXfx/SPARC64Xlfx, mpifrtpx and mpifccpx compiler   # serial serial_NO_GRIB2 dmpar dmpar_NO_GRIB2
#
COMPRESSION_LIBS    = CONFIGURE_COMP_L
COMPRESSION_INC     = CONFIGURE_COMP_I
FDEFS               = CONFIGURE_FDEFS
SFC                 = frtpx
SCC                 = fccpx
DM_FC               = mpifrtpx
DM_CC               = mpifccpx -DMPI2_THREAD_SUPPORT
FC                  = CONFIGURE_FC 
CC                  = CONFIGURE_CC
LD                  = $(FC)
FFLAGS              = $(FORMAT_FREE) -Kautoobjstack,ocl -fw
F77FLAGS            = $(FORMAT_FIXED) -Kautoobjstack,ocl -fw
FORMAT_FREE         = -Free
FORMAT_FIXED        = -Fixed
FCCOMPAT            = CONFIGURE_COMPAT_FLAGS
FCSUFFIX            = 
FNGFLAGS            = $(FFLAGS)
LDFLAGS             =
CFLAGS              = -kfast -Xg -DSUN
CPP                 = /usr/bin/cpp -P -traditional
CPPFLAGS            = -D_UNDERSCORE -DBYTESWAP -DLINUX -DIO_NETCDF -DBIT32 -DNO_SIGNAL CONFIGURE_MPI
RANLIB              = ranlib

added to arch/configure.defaults and then selecting it from the configuration step may work better. This is just a rough take on the WRF Fujitsu stanza ported to the WPS equivalent fields. As I don't have access to the Fujitsu compiler it will be difficult for me to tell you if these are the correct flags to use.

From there, I think you'd only see the HDF5 issue and then the other resources you found should be able to address that error.
 
Yes, I think that may be the issue especially as it is resulting in gfortran option being passed to the Fujitsu compiler. Something like :
Code:
########################################################################################################################
#ARCH    Fujitsu Linux x86_64 SPARC64IXfx/SPARC64Xlfx, mpifrtpx and mpifccpx compiler   # serial serial_NO_GRIB2 dmpar dmpar_NO_GRIB2
#
COMPRESSION_LIBS    = CONFIGURE_COMP_L
COMPRESSION_INC     = CONFIGURE_COMP_I
FDEFS               = CONFIGURE_FDEFS
SFC                 = frtpx
SCC                 = fccpx
DM_FC               = mpifrtpx
DM_CC               = mpifccpx -DMPI2_THREAD_SUPPORT
FC                  = CONFIGURE_FC
CC                  = CONFIGURE_CC
LD                  = $(FC)
FFLAGS              = $(FORMAT_FREE) -Kautoobjstack,ocl -fw
F77FLAGS            = $(FORMAT_FIXED) -Kautoobjstack,ocl -fw
FORMAT_FREE         = -Free
FORMAT_FIXED        = -Fixed
FCCOMPAT            = CONFIGURE_COMPAT_FLAGS
FCSUFFIX            =
FNGFLAGS            = $(FFLAGS)
LDFLAGS             =
CFLAGS              = -kfast -Xg -DSUN
CPP                 = /usr/bin/cpp -P -traditional
CPPFLAGS            = -D_UNDERSCORE -DBYTESWAP -DLINUX -DIO_NETCDF -DBIT32 -DNO_SIGNAL CONFIGURE_MPI
RANLIB              = ranlib

added to arch/configure.defaults and then selecting it from the configuration step may work better. This is just a rough take on the WRF Fujitsu stanza ported to the WPS equivalent fields. As I don't have access to the Fujitsu compiler it will be difficult for me to tell you if these are the correct flags to use.

From there, I think you'd only see the HDF5 issue and then the other resources you found should be able to address that error.
Thank you, Islas. This is something I haven't tried so far. I will try based on your suggestion.
 
Top