richelbilderbeek / pbdmms

Some models
GNU General Public License v3.0
2 stars 0 forks source link

Getting sado on peregrine #250

Closed Lumphie closed 7 years ago

Lumphie commented 7 years ago
# C++14
QMAKE_CXX = g++-
QMAKE_LINK = g++-
QMAKE_CC = gcc-
QMAKE_CXXFLAGS += -std=c++14
# -Weffc++ goes bad with Qt
QMAKE_CXXFLAGS += -Wall -Wextra -Wshadow -Wnon-virtual-dtor -pedantic

# Debug and release mode
CONFIG += debug_and_release

# In release mode, turn on profiling
CONFIG(release, debug|release) {

  DEFINES += NDEBUG

  # gprof
  QMAKE_CXXFLAGS += -pg
  QMAKE_LFLAGS += -pg

}

# In debug mode, turn on gcov and UBSAN
CONFIG(debug, debug|release) {

  # gcov
  QMAKE_CXXFLAGS += -fprofile-arcs -ftest-coverage
  LIBS += -lgcov

  # UBSAN
  QMAKE_CXXFLAGS += -fsanitize=undefined
  QMAKE_LFLAGS += -fsanitize=undefined
  LIBS += -lubsan

  # Only in debug mode, a warning is an error
  QMAKE_CXXFLAGS += -Werror
}

# Qt needed for hiostogram to png
QT += core gui widgets

# Fixes
#/usr/include/boost/math/constants/constants.hpp:277: error: unable to find numeric literal operator 'operator""Q'
#   BOOST_DEFINE_MATH_CONSTANT(half, 5.000000000000000000000000000000000000e-01, "5.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e-01")
#   ^
QMAKE_CXXFLAGS += -fext-numeric-literals

# Prevent Qt for failing with this error:
# qrc_[*].cpp:400:44: error: ‘qInitResources_[*]__init_variable__’ defined but not used
# [*]: the resource filename
QMAKE_CXXFLAGS += -Wno-unused-variable

include(sado.pri)
#include(kewe.pri)
include(pbd.pri)
include(histogram_to_png.pri)
include(../gausser/gausser.pri)
include(gsl.pri)

# Boost.Graph
LIBS += -lboost_graph
include(../BoostGraphTutorial/BoostGraphTutorial/boost_graph_tutorial.pri)

include(../SurfacePlotter/QtSurfacePlotWidget.pri)

SOURCES += sado_main.cpp

I can't make this.

It get errors like these:

error: no type named ‘type’ in ‘struct boost::container_gen<boost::listS, boost::list_edge<long unsigned int, boost::property<boost::edge_bundle_t, int, boost::no_property> > >’
           DirectedEdgeIter, UndirectedEdgeIter>::type edge_iterator;
Lumphie commented 7 years ago

I ran

module load Qt module load GCC/5.1.0

Lumphie commented 7 years ago

@richelbilderbeek any ideas?

richelbilderbeek commented 7 years ago
module load boost

or

module load Boost
Lumphie commented 7 years ago

loading Boost did it. But now I somehow don't have the permission to run it.

/usr/bin/xvfb-run: line 181: ./sado_peregrine: Permission denied

richelbilderbeek commented 7 years ago

Perhaps:

chmod +x sado_peregrine
./sado_peregrine

or

sudo ./sado_peregrine

(but that latter option is scary)

richelbilderbeek commented 7 years ago

Ah, I checked the xvfb wikipedia page. xvfb is for displaying graphics. Either (1) start ssh allowing for X:

ssh -X s123456@peregrine.hpc.rug.nl

or (2) remove the displayal of graphic things.

Lumphie commented 7 years ago

Peregrine is broken now. I think I did all of the above, but can't test it now.

Lumphie commented 7 years ago

Peregrine will probably be fixed tomorrow!

Lumphie commented 7 years ago

@richelbilderbeek

Lots of these.

In file included from /software/software/Boost/1.61.0-foss-2016a/include/boost/graph/adjacency_list.hpp:246:0,
                 from sado_int_edge.h:4,
                 from sado_int_edge.cpp:1:
/software/software/Boost/1.61.0-foss-2016a/include/boost/graph/detail/adjacency_list.hpp: In functie ‘sado::indiv_edg_desc sado::add_int_edge(const vert_desc&, const vert_desc&, int, sado::pedigree_graph&)’:
/software/software/Boost/1.61.0-foss-2016a/include/boost/graph/detail/adjacency_list.hpp:2235:43: let op: ‘p’ may be used uninitialized in this function [-Wmaybe-uninitialized]
       typename Config::edge_property_type p;

And in the end this one.

collect2: fout: ld gaf exit-status 1 terug
make[1]: *** [sado_peregrine] Fout 1
make[1]: Map '/home/s2260050/pbdmms' wordt verlaten
make: *** [release] Fout 2
richelbilderbeek commented 7 years ago

Thanks. I will hopefully look at this soon.

Workaround: just remove -Werror in the .pro files for Peregrine builds.

Lumphie commented 7 years ago
In file included from /software/software/Boost/1.61.0-foss-2016a/include/boost/graph/adjacency_list.hpp:246:0,
                 from sado_indiv_graph.h:4,
                 from sado_indiv_graph.cpp:1:
/software/software/Boost/1.61.0-foss-2016a/include/boost/graph/detail/adjacency_list.hpp: In constructor ‘boost::adj_list_edge_property_map<Directed, Value, Ref, Vertex, Property, Tag>::adj_list_edge_property_map(Tag)’:
/software/software/Boost/1.61.0-foss-2016a/include/boost/graph/detail/adjacency_list.hpp:2653:59: let op: declaration of ‘tag’ shadows a member of ‘boost::adj_list_edge_property_map<Directed, Value, Ref, Vertex, Property, Tag>’ [-Wshadow]
       explicit adj_list_edge_property_map(Tag tag = Tag()): tag(tag) {}
                                                           ^
/software/software/Boost/1.61.0-foss-2016a/include/boost/graph/detail/adjacency_list.hpp:2652:11: note: shadowed declaration is here
       Tag tag;
           ^

This one is from today.

richelbilderbeek commented 7 years ago

Blimey, Boost.Graph shadows parameters! I may look closer into that one.

Worksaround: remove -Wshadow in the .pro file.

Lumphie commented 7 years ago

I removed all error checking in the .pro file and saved it under a different name, but somehow it magically still shows the errors.

richelbilderbeek commented 7 years ago

Can you show one?

Lumphie commented 7 years ago
# C++14
QMAKE_CXX = g++
QMAKE_LINK = g++
QMAKE_CC = gcc
QMAKE_CXXFLAGS += -std=c++1y

# Debug and release mode
CONFIG += debug_and_release

# Qt needed for hiostogram to png
QT += core gui widgets

# Fixes
#/usr/include/boost/math/constants/constants.hpp:277: error: unable to find numeric literal operator 'operator""Q'
#   BOOST_DEFINE_MATH_CONSTANT(half, 5.000000000000000000000000000000000000e-01, "5.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e-01")
#   ^
QMAKE_CXXFLAGS += -fext-numeric-literals

# Prevent Qt for failing with this error:
# qrc_[*].cpp:400:44: error: ‘qInitResources_[*]__init_variable__’ defined but not used
# [*]: the resource filename
QMAKE_CXXFLAGS += -Wno-unused-variable

include(sado.pri)
#include(kewe.pri)
include(pbd.pri)
include(histogram_to_png.pri)
include(../gausser/gausser.pri)
include(gsl.pri)

#Boost.Graph
LIBS += -lboost_graph
include(../BoostGraphTutorial/BoostGraphTutorial/boost_graph_tutorial_helper.pri)
include(../BoostGraphTutorial/BoostGraphTutorial/boost_graph_tutorial_no_properties.pri)

include(../SurfacePlotter/QtSurfacePlotWidget.pri)

SOURCES += sado_main.cpp
[s2260050@peregrine pbdmms]$ nano sado_peregrine1.pro

  GNU nano 2.0.9         Bestand: sado_peregrine1.pro                           

include(../gausser/gausser.pri)
include(gsl.pri)

#Boost.Graph
LIBS += -lboost_graph
include(../BoostGraphTutorial/BoostGraphTutorial/boost_graph_tutorial_helper.pr$
include(../BoostGraphTutorial/BoostGraphTutorial/boost_graph_tutorial_no_proper$

include(../SurfacePlotter/QtSurfacePlotWidget.pri)

SOURCES += sado_main.cpp
richelbilderbeek commented 7 years ago

Ah, replace

# C++14
QMAKE_CXX = g++
QMAKE_LINK = g++
QMAKE_CC = gcc
QMAKE_CXXFLAGS += -std=c++1y

by

# C++14
CONFIG += c++14
QMAKE_CXXFLAGS += -std=c++14

or if the first does not work

# C++14
CONFIG += c++14
QMAKE_CXXFLAGS += -std=c++1y

Ah, and remove these lines altogether, if those were in the script:

[s2260050@peregrine pbdmms]$ nano sado_peregrine1.pro

  GNU nano 2.0.9         Bestand: sado_peregrine1.pro    
Lumphie commented 7 years ago

Oh those last ones are not actually in there, but that's just a copy error from my terminal.

Lumphie commented 7 years ago

Still getting the same errors though.

richelbilderbeek commented 7 years ago

Also, maybe add to sado_peregrine1.pro the line:

include(sado.pri)

Would that work?

Lumphie commented 7 years ago

I'll try that. Also K3 is on the radio downstairs!

richelbilderbeek commented 7 years ago

I come down now!

Lumphie commented 7 years ago

Still the same error.

Lumphie commented 7 years ago
more undefined references to `boost::detail::graph::read_graphviz_new(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::detail::graph::mutate_graph*)' follow
collect2: fout: ld gaf exit-status 1 terug
richelbilderbeek commented 7 years ago

Shucks. I am working on it :muscle:

richelbilderbeek commented 7 years ago

Note to self: it compiles and links fine on my LWP, using build_sado_peregrine that uses sado_peregrine.pro

richelbilderbeek commented 7 years ago

Note to self: hypothesis: Boost version mismatches Graphviz its version

richelbilderbeek commented 7 years ago

Note to self: reproduced the error on Peregrine :wrench:

richelbilderbeek commented 7 years ago

Note to self:

module load Graphviz; module load GCC/5.1.0; module load Boost; make

to investigate closer

richelbilderbeek commented 7 years ago

It works.

Just run ./sado_peregrine_build

If it does not show the Golden Standard, let me know.

You can use that script to base the rest on.

I will start profiling again :+1:

Lumphie commented 7 years ago

[s2260050@peregrine simulations]$ squeue -u $USER JOBID PARTITION NAME USER ST TIME NODES NODELIST(REASON) 11069126 nodes kewe_sad s2260050 R 0:15 1 pg-node089

Lumphie commented 7 years ago

We're up and running!

Lumphie commented 7 years ago

100 GB 8 days should be enough.

Lumphie commented 7 years ago

Got 2 jobs going.

  1. 4000 generations around 250 individuals per generation
  2. 4000 generations around 1500 (for now) individuals per generation

First simulation is done, but I'm waiting for the graphing of the tree. That's gonna take a long time. Second job is going to take even longer!

richelbilderbeek commented 7 years ago

Looking at #251 there are hints for some exponentials in the time :-(

Lumphie commented 7 years ago
Tip: type 'sudo apt-get install graphviz' in the command line
convert_dot_to_svg: 'dot' cannot be found. type 'sudo apt-get install graphviz' in the command line

Yeaahhh.. I don't think I'm allowed to do that.

richelbilderbeek commented 7 years ago

Yeaahhh.. I don't think I'm allowed to do that.

Depend on the computer :wiseguy: :hipster: :sunglasses:

Lumphie commented 7 years ago

It's on peregrine. On my peregrine account I'm not allowed to use sudo. (I'm on the "unauthorized sudo user"-list twice now. So not gonna risk it. Any way around it?

richelbilderbeek commented 7 years ago
module load Graphviz
Lumphie commented 7 years ago

Ik zag dat je al een mailtje had gestuurd.

ssh: connect to host peregrine.hpc.rug.nl port 22: Connection timed out

Lumphie commented 7 years ago

Runs fine now