Opened 7 months ago

Closed 6 months ago

#3364 closed help (fixed)

shumlib on JASMIN

Reported by: vanniere Owned by: um_support
Component: UM Model Keywords:
Cc: Platform:
UM Version:

Description

Dear CMS

I want to build ancillary files for the UM on JASMIN. I installed ANTSv0.13 in my conda environment.
But some ANTS functions require the UM tool um_spiral_search. I have tried to install um_spiral_search from the mule-trunk. However, this requires to install the shumlib library first, for which the compilation fails on JASMIN when I use the default make options.
I tried :

$ ssh sci1.jasmin.ac.uk
$ svn checkout https://github.com/metomi/shumlib.git
$ cd shumlib.git/trunk
$ make -f ./make/vm-x86-gfortran-gcc.mk

but the compilation fails some with some declaration of variables in fortran.

My questions :

  • Is the shumlib already installed on JASMIN?
  • Or else, could you provide help with installing the shumlib on JASMIN?

Many thanks
Benoit

Change History (13)

comment:1 Changed 7 months ago by annette

Hi Benoit,

We were just wondering why want to generate the ancils on Jasmin, and not on the HPC?

Annette

comment:2 Changed 7 months ago by pmcguire

Hi Benoit:
To try to answer your second question:
What are the issues during compilation?
Patrick

comment:3 Changed 7 months ago by pmcguire

Hi Patrick
I tried to compile :
$ cd /home/users/bvanniere/shumlib-master/
$ make -f ./make/vm-x86-gfortran-gcc.mk

That tells me that the compilation option -std=f2008ts is not known. So I replaced it by the default -std=gnu
When I compile again, I have an issue of syntax error in a declaration of variable.

f_shum_string_conv.f90:140.14:

CHARACTER(LEN=:), ALLOCATABLE :: c2f_string_cstr_nolen

1

Error: Syntax error in CHARACTER declaration at (1)
f_shum_string_conv.f90:132:

FUNCTION c2f_string_cstr_nolen(cstr)
1
Error: Function result 'c2f_string_cstr_nolen' at (1) has no IMPLICIT type
f_shum_string_conv.f90:146.20:

ALLOCATE ( CHARACTER(LEN=cstr_len) :: c2f_string_cstr_nolen )

1

Error: Syntax error in ALLOCATE statement at (1)

<<<<<<<<<<

If you have any idea…
Cheers
Benoit

comment:4 Changed 7 months ago by pmcguire

Hi Benoit:
I was able to compile your shumlib code on JASMIN by using the intel compiler instead of the gfortran compiler, with these steps:

svn checkout https://github.com/metomi/shumlib.git
cd shumlib.git/trunk
cp make/vm-x86-gfortran-gcc.mk make/vm-x86-ifort-gcc.mk
vi make/vm-x86-ifort-gcc.mk

Replace: gfortran with ifort
Replace: vm-x86-gfortran-gcc with vm-x86-ifort-gcc
Remove: -std=f2008ts

make -f ./make/vm-x86-ifort-gcc.mk clean
make -f ./make/vm-x86-ifort-gcc.mk

Does that work for you?
Patrick

comment:5 Changed 7 months ago by pmcguire

Hi Patrick

Thanks for your solution! It sounds fantastic. I will try to compile the um spiral search now with the shumlib library.

Thanks again.
Cheers
Benoit

comment:6 Changed 7 months ago by pmcguire

Hi Benoit:
Excellent! Please let me know how it works.
Maybe someone else knows more about your first question, but I am not aware of a central installation of shumlib on JASMIN.
Patrick

comment:7 Changed 7 months ago by pmcguire

Hi Benoit:
Also, you could try the ANTS Rose/Cylc suite on the external MONSOON. I got it working there, partly with Simon Wilson's help.
Patrick

comment:8 Changed 7 months ago by vanniere

Hi Annette

I will have to use the ancillaries on the ECMWF machine.
I doubt anything is installed there anyway so I thought it would be as much work to install those libraries on the EMCWF machine or on JASMIN.
On the long term, I think it would be nice to be able to prepare ancillaries on JASMIN as this is the most conveniently accessible server from all the machines we run use (Archer, ECMWF, MONSooN).
But there might be other technical problems I haven't considered.

Thanks
Benoit

comment:9 Changed 7 months ago by vanniere

Hi Patrick

  • I am not able to compile with your suggested changes… I wonder why. Which jasmin machine did you use for the compilation? I tried several all with the same result.
  • I tried to use your compiled version of shumlib to install um_spiral_search following the recommendations in /home/users/bvanniere/mule-trunk/um_spiral_search/README

but it is unclear to me what I am supposed to put in DIR :

The README says : DIR should be the path containing the "include" and “lib" subdirectories, with the "libshum_spiral_search.so" shared object present in “lib”.

$ DIR=/path/to/the/shumlib/library
$ python setup.py build_ext --inplace -I$DIR/include -L$DIR/lib -R$DIR/lib

But ~pmcguire/trunk/shum_spiral_search/ seems to have a somewhat different architecture than what is expected…

Thanks
Benoit

comment:10 Changed 7 months ago by pmcguire

Hi Benoit:
I compiled it on jasmin-sci2.
Did you try the make clean step in my instructions? That step is important in order to get rid of any partially-compiled information from when you were trying with gfortran.
What error messages do you get when you try to compile it?

The path to my compiled version is:
/home/users/pmcguire/shumlib.git/trunk/build/vm-x86-ifort-gcc/
Does that version work for you?
Patrick

comment:11 Changed 7 months ago by vanniere

Hi Patrick and Annette

I think I got it to work at the end. I will summarise here what I did to install the um_spiral_search in the ANTS environment on JASMIN, including Patrick's recommendations. I had ANTSv0.13 already installed as a conda environment and mule already installed in this environment.

Step 1 : Install the shumlib library

$ svn checkout ​https://github.com/metomi/shumlib.git
$ cd ~shumlib.git/trunk
$ cp make/vm-x86-gfortran-gcc.mk make/vm-x86-ifort-gcc.mk 
$ vi make/vm-x86-ifort-gcc.mk 

in vm-x86-ifort-gcc.mk, replace gfortran with ifort, replace vm-x86-gfortran-gcc with vm-x86-ifort-gccand remove -std=f2008ts

$ module load intel/15.0
$ make -f ./make/vm-x86-ifort-gcc.mk 

Step 2 : Install um_spiral_search

$ svn co https://code.metoffice.gov.uk/svn/um/mule/trunk ./mule-trunk
$ cd ./mule-trumk/um_spiral_search/
$ DIR= /home/users/bvanniere/shumlib.git/trunk/build/vm-x86-ifort-gcc/ 
$ python setup.py build_ext --inplace -I$DIR/include -L$DIR/lib -R$DIR/lib
$ python setup.py build
$ python setup.py install

Step 3 : Using um_spiral_search in ANTS
Load the intel compiler before using um_spiral_search with ANTS.

Thanks again for your help,
Benoit

comment:12 Changed 7 months ago by pmcguire

Hi Benoit:
Excellent! I am glad to hear that it works for you. Good job!
Patrick

comment:13 Changed 6 months ago by ros

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.