HOWTO: Installing Serpent on Windows via Cygwin

Compiler issues (Intel compiler, mpicc, etc.), data libraries and everything needed to get Serpent running is discussed here

HOWTO: Installing Serpent on Windows via Cygwin

Postby tomasz » Sat Sep 22, 2012 8:43 pm

Hi everyone,

I see a few users tried to compile on Windows under Cygwin. As people have pointed out, the compilation fails in broadcrosssection.c due to call to erf() which does not appear to be included in Cygwin gcc. But in fact it is included in math.h, which is included in tgmath.h, which is included in broadcrosssection.c. The problem is that the standard ANSI C does not include it (or includes it somewhere else). So all you have to do is not use full standard ANSI C and let include works its magic!

Here are approximate instructions, it it the same for Serpent v1.x and v2.x:

1. Install Cygwin, add gcc-4, make, perl package, and all their dependencies (perl is for xsdirconvert.pl, not compilation itself).

2. Disable GD library option in Makefile.

3. Remove -ansi compilation option in Makefile.

4. make

5. Check that sss.exe (or sss2.exe) was created and enjoy Serpent on Windows!

Small problems without burnup work fine and give correct results (same as on Linux). The only limitation I found so far is that you will not be able to run burnup or very large problems with Serpent v1.x on 32-bit because of memory limits (max process size is 2GB).

Now for neutron libraries:

1. Modify the first line of .xsdir file using full Cygwin path to your libraries, for example, on my computer it is in D:\xs\endfb7:

datapath=/cygdrive/d/xs/endfb7/acedata

Note: Use simple path, similar to mine. Do not use directories with spaces or any special characters.

2. Use pearl script 'xsdirconvert.pl' (remember to get the new version from Serpent website) as you would under Linux, for example, on my computer it is:

> ./xsdirconvert.pl sss_endfb7u.xsdir > sss_endfb7.xsdata

3. In the Serpent input file, use full Cygwin path to your libraries, for example, on my computer it is:

set acelib "/cygdrive/d/xs/endfb7/sss_endfb7.xsdata"
set declib "/cygdrive/d/xs/endfb7/sss_endfb7.dec"
set nfylib "/cygdrive/d/xs/endfb7/sss_endfb7.nfy"

Jaakko and VTT, thank you for the wonderful code!

Tomasz Kozlowski
tomasz
 
Posts: 1
Joined: Fri Mar 02, 2012 6:08 pm

Re: HOWTO: Installing Serpent on Windows via Cygwin

Postby xixipang » Wed Feb 04, 2015 3:19 pm

Hello Tomasz,

thanks for your instruction!

Today I have tried your method for serpent 2.1.19. During the make process there are a lot of warmings but they didn't interupt the installation.

After the installation, the version information can be displayed correctly, the exe in cygwin x64 (on win 7 x64) can calculate volume and also plot geometry (I add gd lib in cygwin and this part is successfully compiled). However if one parameter is not properly written, e.g. "-1" after dv
Code: Select all
det Vaxialflux1f dv -1 dm fuel dz 0.0 120.0 101  dy -10.0 10.0 1


The serpent exe file in cygwin gave the error message:
Code: Select all
Invalid value "Invalid value "%s", must be between %1.3E and %1.3E", must be between 1.273E-313 and 0.000E+00


while the serpent file in ubuntu, whose installation is verified by calculations, gave the error message:
Code: Select all
Invalid value "-1", must be between 0.000E+00 and 1.000E+37


Other kinds of error messages with "cited variables"(eg."%s") will display like this, too.

If all the parameters are right, serpent exe file in cygwin will gave this log:
Code: Select all
.....(everything just like normal)

Processing cross sections and ENDF reaction laws...

***** Wed Feb  4 12:05:51 2015 (seed = 4871438951)
Warning message from function ProcessMuDistributions:
(nothing here)


and the serpent exe aborted.

Have you been through this? I am wondering if there are some problems during the compiling.

Thanks!!
xixipang
 
Posts: 22
Joined: Mon Nov 04, 2013 12:37 pm

Re: HOWTO: Installing Serpent on Windows via Cygwin

Postby Jaakko Leppänen » Thu Feb 05, 2015 10:21 am

Are you running with MPI? The first error looks like it's been printed by two separate tasks. This happens if you running Serpent with mpirun (or similar), and the code is not compiled with the MPI options. Instead of starting one parallel calculation, mpirun starts several independent runs.
- Jaakko
User avatar
Jaakko Leppänen
Site Admin
 
Posts: 1822
Joined: Thu Mar 18, 2010 10:43 pm
Location: Espoo, Finland

Re: HOWTO: Installing Serpent on Windows via Cygwin

Postby xixipang » Fri Feb 06, 2015 1:01 am

Jaakko Leppänen wrote:Are you running with MPI? The first error looks like it's been printed by two separate tasks. This happens if you running Serpent with mpirun (or similar), and the code is not compiled with the MPI options. Instead of starting one parallel calculation, mpirun starts several independent runs.


No, I have commented mpi option in the makefile, only omp is selected and compiled. However it seems that has nothing to do with parallel calculation. No matter I use -omp or only with 1 core for the calculation, the error remains.

If this is helpful:

1. During the compile there were plenty of warnings : "-Wmaybe-uninitialized", "[-Wimplicit-function-declaration", "-Wchar-subscripts"

2. I have tried to compile without gd lib and without openmp to make a simplest installation, but the problem remains.
xixipang
 
Posts: 22
Joined: Mon Nov 04, 2013 12:37 pm

Re: HOWTO: Installing Serpent on Windows via Cygwin

Postby terryphi » Fri Mar 24, 2017 12:52 am

Hey, I got Serpent 2 compiled under Cygwin using an unchaged makefile (GD and ANSI enabled)
You've just got to make sure libgb-devel is installed from the cygwin installer!
terryphi
 
Posts: 23
Joined: Sun Feb 05, 2017 5:44 am


Return to Compiling and installing Serpent

Who is online

Users browsing this forum: No registered users and 1 guest

cron